ws-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andreas Veithen (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (AXIOM-393) Premature END_DOCUMENT event generated by OMStAXWrapper
Date Sun, 16 Oct 2011 08:06:11 GMT

     [ https://issues.apache.org/jira/browse/AXIOM-393?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Andreas Veithen resolved AXIOM-393.
-----------------------------------

    Resolution: Fixed
    
> Premature END_DOCUMENT event generated by OMStAXWrapper
> -------------------------------------------------------
>
>                 Key: AXIOM-393
>                 URL: https://issues.apache.org/jira/browse/AXIOM-393
>             Project: Axiom
>          Issue Type: Bug
>          Components: DOOM, LLOM
>    Affects Versions: 1.2.12
>            Reporter: Andreas Veithen
>            Assignee: Andreas Veithen
>            Priority: Minor
>             Fix For: 1.2.13
>
>
> In some cases, the XMLStreamReader returned by OMContainer#getXMLStreamReader generates
a premature END_DOCUMENT event.
> This occurs when all of the following conditions are met:
> 1. Caching is turned off.
> 2. The subtree contains elements that have the same name as the element on which getXMLStreamReader
is invoked (example:. <element><element><element/><element/></element></element>).
> 3. The subtree is partially built.
> The root cause can be traced back to an incorrect fix for AXIOM-151 which introduced
the following code in OMStAXWrapper (see r552397):
> //this is a potential place for bugs
> //we have to test if the root node of this parser
> //has the same name for this test
> if (currentEvent == START_ELEMENT &&
>         (parser.getLocalName().equals(((OMElement)rootNode).getLocalName()))) {
>     ++depth;
> } else if (currentEvent == END_ELEMENT   &&
>        (parser.getLocalName().equals(((OMElement)rootNode).getLocalName())) ) {     
                                
>     --depth;
>     if (depth < 0) {
>         state = COMPLETED;
>     }
> }

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ws.apache.org
For additional commands, e-mail: dev-help@ws.apache.org


Mime
View raw message