-
Bug
-
Resolution: Fixed
-
P4
-
1.4.0
-
1.4
-
generic
-
generic
-
Verified
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2153421 | 7 | Joe Wang | P4 | Closed | Fixed | b14 |
JDK-2182511 | 6u18 | Joe Wang | P4 | Resolved | Fixed | b02 |
While I don't see the problem reported in issue 2 in the new filtered streamreader, I did find an interesting question about these getters. I added a unit test which shows that when an element does not have attribute, in the following methods:
r1.getAttributeValue(0);
r1.getAttributeType(0);
r1.getAttributePrefix(0);
r1.getAttributeNamespace(0);
r1.getAttributeName(0);
only the last would throw an exception, even so, the exception was not thrown from getAttributeName. here's the exception:
at com.sun.xml.stream.XMLReaderImpl.convertXNIQNametoJavaxQName(XMLReaderImpl.java:1209)
at com.sun.xml.stream.XMLReaderImpl.getAttributeName(XMLReaderImpl.java:633)
at com.sun.xml.stream.XMLStreamFilterImpl.getAttributeName(XMLStreamFilterImpl.java:200)
at XMLStreamFilterTest.GettersTest.checkAttributes(GettersTest.java:94)
at XMLStreamFilterTest.GettersTest.testGetAttributes(GettersTest.java:152)
r1.getAttributeValue(0);
r1.getAttributeType(0);
r1.getAttributePrefix(0);
r1.getAttributeNamespace(0);
r1.getAttributeName(0);
only the last would throw an exception, even so, the exception was not thrown from getAttributeName. here's the exception:
at com.sun.xml.stream.XMLReaderImpl.convertXNIQNametoJavaxQName(XMLReaderImpl.java:1209)
at com.sun.xml.stream.XMLReaderImpl.getAttributeName(XMLReaderImpl.java:633)
at com.sun.xml.stream.XMLStreamFilterImpl.getAttributeName(XMLStreamFilterImpl.java:200)
at XMLStreamFilterTest.GettersTest.checkAttributes(GettersTest.java:94)
at XMLStreamFilterTest.GettersTest.testGetAttributes(GettersTest.java:152)
- backported by
-
JDK-2182511 getAttributeName throws nullpointer exception for an element without attribute
-
- Resolved
-
-
JDK-2153421 getAttributeName throws nullpointer exception for an element without attribute
-
- Closed
-