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/14 19:10:21 UTC
svn commit: r1433017 -
/webservices/commons/trunk/modules/axiom/modules/axiom-common-impl/src/main/java/org/apache/axiom/om/impl/common/SwitchingWrapper.java
Author: veithen
Date: Mon Jan 14 18:10:21 2013
New Revision: 1433017
URL: http://svn.apache.org/viewvc?rev=1433017&view=rev
Log:
Dead code elimination. The removed code has become obsolete because we reduced the lookahead (see r1432713 and r1432754).
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=1433017&r1=1433016&r2=1433017&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 Mon Jan 14 18:10:21 2013
@@ -89,12 +89,6 @@ class SwitchingWrapper extends AbstractX
// flags that tell the status of the navigator
- /** Field end */
- private boolean _end = false;
-
- /** Field start */
- private boolean _start = true;
-
// Indicates if an OMSourcedElement with an OMDataSource should
// be considered as an interior node or a leaf node.
private boolean _isDataSourceALeaf = false;
@@ -897,22 +891,10 @@ class SwitchingWrapper extends AbstractX
* is passed it returns the same item in the next encounter as well.
*/
private OMSerializable getNext() {
- if (_next == null) {
- return null;
- }
_node = _next;
_visited = _backtracked;
_backtracked = false;
updateNextNode();
-
- // set the starting and ending flags
- if (_root.equals(_node)) {
- if (!_start) {
- _end = true;
- } else {
- _start = false;
- }
- }
return _node;
}
@@ -1017,10 +999,8 @@ class SwitchingWrapper extends AbstractX
* navigator cannot proceed.
*/
private void step() {
- if (!_end) {
- _next = _node;
- updateNextNode();
- }
+ _next = _node;
+ updateNextNode();
}
/**
@@ -1029,19 +1009,10 @@ class SwitchingWrapper extends AbstractX
* @return Returns boolean.
*/
private boolean isNavigable() {
- return !_end && _next != null;
+ return _next != null;
}
/**
- * Returns the completed status.
- *
- * @return Returns boolean.
- */
- private boolean isCompleted() {
- return _end;
- }
-
- /**
* Method next.
*
* @return Returns int.
@@ -1058,8 +1029,6 @@ class SwitchingWrapper extends AbstractX
case NAVIGABLE:
if (isNavigable()) {
lastNode = getNext();
- } else if (isCompleted()) {
- lastNode = null;
} else if (cache) {
builder.next();
step();