axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eran Chinthaka (JIRA)" <j...@apache.org>
Subject [jira] Assigned: (AXIS2-818) org.apache.axis2.util.StreamWraper may produce START_DOCUMENT events twice
Date Wed, 05 Jul 2006 08:29:31 GMT
     [ http://issues.apache.org/jira/browse/AXIS2-818?page=all ]

Eran Chinthaka reassigned AXIS2-818:
------------------------------------

    Assign To: Ajith Harshana Ranabahu

> org.apache.axis2.util.StreamWraper may produce START_DOCUMENT events twice
> --------------------------------------------------------------------------
>
>          Key: AXIS2-818
>          URL: http://issues.apache.org/jira/browse/AXIS2-818
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Bug

>   Components: core
>     Versions: 1.0
>     Reporter: Raymond Feng
>     Assignee: Ajith Harshana Ranabahu

>
> If  StreamWrapper is used to wrap a XMLStreamReader positioned at START_ELEMENT, then
it will produce START_DOCUMENT events twice.
> Assuming StreamWrapper wrapper = new StreamingWrapper(realReader);
> 1) wrapper.getEventType() returns START_DOCUMENT
> 2) wrapper.next() still returns START_DOCUMENT by the logic in code below. (in this case,
state==STATE_INIT && realReader.getEventType() == START_ELEMENT)
> public int next() throws XMLStreamException {
>         prevState = state;
>         int returnEvent = -1;
>         switch (state) {
>             case STATE_INIT:
>                 if (realReader.getEventType() == START_DOCUMENT) {
>                     state = STATE_SWITCHED;
>                     returnEvent = realReader.getEventType();
>                 } else {
>                     state = STATE_SWITCH_AT_NEXT;
>                     returnEvent = START_DOCUMENT;
>                 }
>                 break;
> ...
>     }

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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


Mime
View raw message