Revision: 12767
http://sourceforge.net/p/foray/code/12767
Author: victormote
Date: 2022-12-03 00:13:35 +0000 (Sat, 03 Dec 2022)
Log Message:
-----------
Don't look for next node if the current node is the root.
Modified Paths:
--------------
trunk/foray/foray-common/src/main/java/org/foray/common/data/AbstractOrderedTreeNode.java
Modified: trunk/foray/foray-common/src/main/java/org/foray/common/data/AbstractOrderedTreeNode.java
===================================================================
--- trunk/foray/foray-common/src/main/java/org/foray/common/data/AbstractOrderedTreeNode.java 2022-12-03 00:12:05 UTC (rev 12766)
+++ trunk/foray/foray-common/src/main/java/org/foray/common/data/AbstractOrderedTreeNode.java 2022-12-03 00:13:35 UTC (rev 12767)
@@ -271,6 +271,9 @@
/* If there are no siblings, then the parent's children are all
* processed, and the parent is the next node. If that happens to be
* null, then we are done, and null is what should be returned. */
+ if (getParent() == null) {
+ return null;
+ }
return getParent().asOrderedNode();
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|