cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r556954 - in /incubator/cxf/trunk: common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
Date Tue, 17 Jul 2007 16:04:34 GMT
Author: dkulp
Date: Tue Jul 17 09:04:32 2007
New Revision: 556954

URL: http://svn.apache.org/viewvc?view=rev&rev=556954
Log:
Fix for DepthXMLStreamReader to keep depth aligned on getElementText calls

Modified:
    incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
    incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java

Modified: incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java?view=diff&rev=556954&r1=556953&r2=556954
==============================================================================
--- incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
(original)
+++ incubator/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/DepthXMLStreamReader.java
Tue Jul 17 09:04:32 2007
@@ -84,7 +84,9 @@
     }
 
     public String getElementText() throws XMLStreamException {
-        return reader.getElementText();
+        String ret = reader.getElementText(); 
+        depth--;
+        return ret;
     }
 
     public String getEncoding() {

Modified: incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
URL: http://svn.apache.org/viewvc/incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java?view=diff&rev=556954&r1=556953&r2=556954
==============================================================================
--- incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
(original)
+++ incubator/cxf/trunk/rt/databinding/aegis/src/main/java/org/apache/cxf/aegis/xml/stax/ElementReader.java
Tue Jul 17 09:04:32 2007
@@ -77,7 +77,8 @@
     }
 
     public ElementReader(XMLStreamReader reader) {
-        this(new DepthXMLStreamReader(reader));
+        this(reader instanceof DepthXMLStreamReader ? (DepthXMLStreamReader)reader
+            : new DepthXMLStreamReader(reader));
     }
 
     /**
@@ -124,7 +125,7 @@
         if (value == null) {
             try {
                 value = root.getElementText();
-
+                
                 while (checkHasMoreChildReaders()) {
                     //TODO - busy wait
                 }



Mime
View raw message