org.apache.axiom.om.impl.llom.OMStAXWrapper.getAttributeType(int) should return
a default value "CDATA" instead of null
-----------------------------------------------------------------------------------------------------------------------
Key: WSCOMMONS-395
URL: https://issues.apache.org/jira/browse/WSCOMMONS-395
Project: WS-Commons
Issue Type: Bug
Components: AXIOM
Reporter: Raymond Feng
Sun's JAXB-RI checks XMLStreamReader.getAttributeType() when it tries to build
a DOM representation from the stream and it throws NPE as the following method
in class org.apache.axiom.om.impl.llom.OMStAXWrapper returns null:
public String getAttributeType(int i) {
String returnString = null;
if (parser != null) {
returnString = parser.getAttributeType(i);
} else {
if (isStartElement() || (currentEvent == ATTRIBUTE)) {
// todo implement this
} else {
throw new IllegalStateException(
"attribute type accessed in illegal event!");
}
}
return returnString;
}
The fix can be:
String returnString = "CDATA";
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.