jaxp
  1. jaxp
  2. JAXP-63

attribute is accessible with invalid namespace

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: milestone 1
    • Component/s: www
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      63

      Description

      attributes with defined prefix (namespace) is accessible with "empty" namespace.

      for example

      xml: <prefix:rootElem xmlns:prefix="something" prefix:attr="attrValue" />

      code:
      public void startElement(String uri, String localName, String qName,
      Attributes atts) throws SAXException

      { super.startElement(uri, localName, qName, atts); String attr_WithNs = atts.getValue("something", "attr"); String attr_NoNs = atts.getValue("", "attr"); }

      attr_NoNs should be null but atts.getValue returns same thing as is set in
      attr_WithNs.

      This is confirmed regression (introduced in JDK6_18, present in OpenJDK7).

        Activity

        Hide
        Pavel Bucek added a comment -

        Created an attachment (id=23)
        testcase

        Show
        Pavel Bucek added a comment - Created an attachment (id=23) testcase
        Hide
        Joe Wang added a comment -

        thanks

        Show
        Joe Wang added a comment - thanks
        Hide
        Martin Grebac added a comment -

        Hi, this is an imortant issue wrt JAXB. What is the timeframe for JDK fix? I
        hope it's going to be in the next available JDK update.

        Show
        Martin Grebac added a comment - Hi, this is an imortant issue wrt JAXB. What is the timeframe for JDK fix? I hope it's going to be in the next available JDK update.
        Hide
        Joe Wang added a comment -

        Refer to 6949607. Fixed in jaxp 1.4 and integrated into jdk6 update 21.

        Show
        Joe Wang added a comment - Refer to 6949607. Fixed in jaxp 1.4 and integrated into jdk6 update 21.
        Hide
        Martin Grebac added a comment -

        Perfect, thanks!

        Show
        Martin Grebac added a comment - Perfect, thanks!

          People

          • Assignee:
            Joe Wang
            Reporter:
            Pavel Bucek
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: