OMStAXWrapper generated illegal event code of 0
-----------------------------------------------

                 Key: WSCOMMONS-536
                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-536
             Project: WS-Commons
          Issue Type: Bug
          Components: AXIOM
    Affects Versions: Axiom 1.2.8
            Reporter: Myles Bunbury


org.apache.axiom.om.impl.llom.OMStAXWrapper.generateEvents(OMNode node) 
initializes "returnEvent" to 0. If the 'node' object passed in represents a 
node type not explicitly handled (ie. other than element, text, comment or 
cdata), then the code was goes through the default case which leaves the 
"returnEvent" value set to 0. This method is returned to the calling method, 
next(), which in turn returns this value. 0, however, is not a valid value as 
defined by javax.xml.stream.XMLStreamConstants.

At first glance, a possible fix might simply be to add the following line to 
the default case in generateEvents():
  returnEvent = nodeType;

I encountered this issue when some XML I was parsing ended up creating a node 
with type XMLStreamConstants.SPACE.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to