You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by ve...@apache.org on 2009/04/04 11:54:53 UTC
svn commit: r761884 -
/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMStAXWrapper.java
Author: veithen
Date: Sat Apr 4 09:54:53 2009
New Revision: 761884
URL: http://svn.apache.org/viewvc?rev=761884&view=rev
Log:
Fixed OMStAXWrapper to throw a NoSuchElementException instead of an XMLStreamException when next() is called after END_DOCUMENT. This is required by the StAX specs.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMStAXWrapper.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMStAXWrapper.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMStAXWrapper.java?rev=761884&r1=761883&r2=761884&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMStAXWrapper.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-api/src/main/java/org/apache/axiom/om/impl/OMStAXWrapper.java Sat Apr 4 09:54:53 2009
@@ -23,6 +23,7 @@
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.Map;
+import java.util.NoSuchElementException;
import java.util.Stack;
import javax.activation.DataHandler;
@@ -962,7 +963,7 @@
public int next() throws XMLStreamException {
switch (state) {
case DOCUMENT_COMPLETE:
- throw new XMLStreamException("End of the document reached");
+ throw new NoSuchElementException("End of the document reached");
case COMPLETED:
state = DOCUMENT_COMPLETE;
currentEvent = END_DOCUMENT;