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/01/13 20:41:27 UTC
svn commit: r1432714 -
/webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
Author: veithen
Date: Sun Jan 13 19:41:27 2013
New Revision: 1432714
URL: http://svn.apache.org/viewvc?rev=1432714&view=rev
Log:
Code simplification.
Modified:
webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
Modified: webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
URL: http://svn.apache.org/viewvc/webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java?rev=1432714&r1=1432713&r2=1432714&view=diff
==============================================================================
--- webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java (original)
+++ webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java Sun Jan 13 19:41:27 2013
@@ -981,28 +981,17 @@ class SwitchingWrapper extends AbstractX
private void updateNextNode() {
if (navigator.isNavigable()) {
nextNode = navigator.getNext();
+ } else if (navigator.isCompleted()) {
+ nextNode = null;
+ } else if (cache) {
+ builder.next();
+ navigator.step();
+ nextNode = navigator.getNext();
} else {
- if (cache) {
- if (navigator.isCompleted()) {
- nextNode = null;
- } else {
- builder.next();
- navigator.step();
- nextNode = navigator.getNext();
- }
- } else {
- //at this point check whether the navigator is done
- //if the navigator is done then we are fine and can directly
- // jump to the complete state ?
- if (navigator.isCompleted()) {
- nextNode = null;
- } else {
- // reset caching (the default is ON so it was not needed in the
- // earlier case!
- builder.setCache(false);
- state = SWITCH_AT_NEXT;
- }
- }
+ // reset caching (the default is ON so it was not needed in the
+ // earlier case!
+ builder.setCache(false);
+ state = SWITCH_AT_NEXT;
}
}