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
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]