ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1484088 - /webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/SwitchingWrapper.java
Date Sat, 18 May 2013 10:57:34 GMT
Author: veithen
Date: Sat May 18 10:57:34 2013
New Revision: 1484088

URL: http://svn.apache.org/r1484088
Log:
next() never generates a START_DOCUMENT event.

Modified:
    webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/SwitchingWrapper.java

Modified: webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/SwitchingWrapper.java
URL: http://svn.apache.org/viewvc/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/SwitchingWrapper.java?rev=1484088&r1=1484087&r2=1484088&view=diff
==============================================================================
--- webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/SwitchingWrapper.java
(original)
+++ webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/SwitchingWrapper.java
Sat May 18 10:57:34 2013
@@ -770,13 +770,11 @@ final class SwitchingWrapper extends Pul
                             }
                         }
                     }
-                    if (node instanceof OMContainer) {
-                        OMContainer container = (OMContainer)node;
-                        if (visited) {
-                            currentEvent = container instanceof OMDocument ? END_DOCUMENT
: END_ELEMENT;
-                        } else {
-                            currentEvent = container instanceof OMDocument ? START_DOCUMENT
: START_ELEMENT;
-                        }
+                    if (node instanceof OMDocument) {
+                        assert visited;
+                        currentEvent = END_DOCUMENT;
+                    } else if (node instanceof OMElement) {
+                        currentEvent = visited ? END_ELEMENT : START_ELEMENT;
                     } else {
                         currentEvent = ((OMNode)node).getType();
                     }



Mime
View raw message