Return-Path: Delivered-To: apmail-ws-axis-dev-archive@www.apache.org Received: (qmail 15301 invoked from network); 13 Jun 2006 19:15:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 13 Jun 2006 19:15:52 -0000 Received: (qmail 6094 invoked by uid 500); 13 Jun 2006 19:15:43 -0000 Delivered-To: apmail-ws-axis-dev-archive@ws.apache.org Received: (qmail 6053 invoked by uid 500); 13 Jun 2006 19:15:43 -0000 Mailing-List: contact axis-dev-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-dev@ws.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list axis-dev@ws.apache.org Received: (qmail 6038 invoked by uid 99); 13 Jun 2006 19:15:43 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2006 12:15:43 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 Jun 2006 12:15:42 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AD69D71421B for ; Tue, 13 Jun 2006 19:14:30 +0000 (GMT) Message-ID: <33466457.1150226070707.JavaMail.jira@brutus> Date: Tue, 13 Jun 2006 19:14:30 +0000 (GMT+00:00) From: "Raymond Feng (JIRA)" To: axis-dev@ws.apache.org Subject: [jira] Created: (AXIS2-818) org.apache.axis2.util.StreamWraper may produce START_DOCUMENT events twice MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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: axis-dev-unsubscribe@ws.apache.org For additional commands, e-mail: axis-dev-help@ws.apache.org