You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by dk...@apache.org on 2008/07/22 20:35:54 UTC

svn commit: r678852 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java

Author: dkulp
Date: Tue Jul 22 11:35:54 2008
New Revision: 678852

URL: http://svn.apache.org/viewvc?rev=678852&view=rev
Log:
[CXF-1578] Workaround bug in Jettison reader

Modified:
    cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java?rev=678852&r1=678851&r2=678852&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java (original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java Tue Jul 22 11:35:54 2008
@@ -84,7 +84,12 @@
     }
 
     public String getElementText() throws XMLStreamException {
-        String ret = reader.getElementText(); 
+        String ret = reader.getElementText();
+        //workaround bugs in some readers that aren't properly advancing to 
+        //the END_ELEMNT (*cough*jettison*cough*)
+        while (reader.getEventType() != XMLStreamReader.END_ELEMENT) {
+            reader.next();
+        }
         depth--;
         return ret;
     }