You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ws.apache.org by ve...@apache.org on 2013/05/18 11:48:58 UTC
svn commit: r1484081 -
/webservices/axiom/trunk/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/serializer/pull/SwitchingWrapper.java
Author: veithen
Date: Sat May 18 09:48:58 2013
New Revision: 1484081
URL: http://svn.apache.org/r1484081
Log:
We no longer need to track the depth.
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=1484081&r1=1484080&r2=1484081&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:48:58 2013
@@ -138,9 +138,6 @@ final class SwitchingWrapper extends Pul
*/
private final boolean preserveNamespaceContext;
- /** Track depth to ensure we stop generating events when we are done with the root node. */
- int depth = 0;
-
// Cache attributes and namespaces. This avoids creating a new Iterator for every call
// to getAttributeXXX and getNamespaceXXX. A value of -1 indicates that the
// attributes or namespaces for the current element have not been loaded yet. The
@@ -800,11 +797,6 @@ final class SwitchingWrapper extends Pul
visited = true;
currentEvent = wrapper.next();
}
- if (currentEvent == START_ELEMENT) {
- depth++;
- } else if (currentEvent == END_ELEMENT) {
- depth--;
- }
if (rootNode == node && visited) {
if (currentEvent == END_DOCUMENT) {
state = DOCUMENT_COMPLETE;