cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r684842 - /cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java
Date Mon, 11 Aug 2008 17:53:32 GMT
Author: dkulp
Date: Mon Aug 11 10:53:31 2008
New Revision: 684842

URL: http://svn.apache.org/viewvc?rev=684842&view=rev
Log:
Update DOMStreamReader to properly consider whitespace.

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

Modified: cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java
URL: http://svn.apache.org/viewvc/cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java?rev=684842&r1=684841&r2=684842&view=diff
==============================================================================
--- cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java
(original)
+++ cxf/trunk/common/common/src/main/java/org/apache/cxf/staxutils/AbstractDOMStreamReader.java
Mon Aug 11 10:53:31 2008
@@ -262,6 +262,16 @@
      * @see javax.xml.stream.XMLStreamReader#isWhiteSpace()
      */
     public boolean isWhiteSpace() {
+        if (currentEvent == CHARACTERS || currentEvent == CDATA) {
+            String text = getText();
+            int len = text.length();
+            for (int i = 0; i < len; ++i) {
+                if (text.charAt(i) > 0x0020) {
+                    return false;
+                }
+            }
+            return true;
+        }
         return currentEvent == SPACE;
     }
 



Mime
View raw message