ws-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From veit...@apache.org
Subject svn commit: r1484080 - /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 09:42:13 GMT
Author: veithen
Date: Sat May 18 09:42:13 2013
New Revision: 1484080

URL: http://svn.apache.org/r1484080
Log:
Inlined a private method that is only used once.

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=1484080&r1=1484079&r2=1484080&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 09:42:13 2013
@@ -800,7 +800,18 @@ final class SwitchingWrapper extends Pul
                     visited = true;
                     currentEvent = wrapper.next();
                 }
-                updateCompleteStatus();
+                if (currentEvent == START_ELEMENT) {
+                    depth++;
+                } else if (currentEvent == END_ELEMENT) {
+                    depth--;
+                }
+                if (rootNode == node && visited) {
+                    if (currentEvent == END_DOCUMENT) {
+                        state = DOCUMENT_COMPLETE;
+                    } else {
+                        state = COMPLETED;
+                    }
+                }
                 break;
             default:
                 throw new IllegalStateException("unsuppported state!");
@@ -839,21 +850,6 @@ final class SwitchingWrapper extends Pul
         return null;
     }
 
-    private void updateCompleteStatus() {
-        if (currentEvent == START_ELEMENT) {
-            depth++;
-        } else if (currentEvent == END_ELEMENT) {
-            depth--;
-        }
-        if (rootNode == node && visited) {
-            if (currentEvent == END_DOCUMENT) {
-                state = DOCUMENT_COMPLETE;
-            } else {
-                state = COMPLETED;
-            }
-        }
-    }
-
     NamespaceContext getNamespaceContext() {
         if (parser != null) {
             return currentEvent == END_DOCUMENT ? new MapBasedNamespaceContext(Collections.EMPTY_MAP)
: parser.getNamespaceContext();



Mime
View raw message