You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by le...@locus.apache.org on 2000/11/27 23:49:17 UTC
cvs commit: xml-xerces/java/src/org/apache/xerces/dom NodeIteratorImpl.java
lehors 00/11/27 14:49:15
Modified: java/src/org/apache/xerces/dom NodeIteratorImpl.java
Log:
applied patch from Elena Litani:
nextNode failed to stop at the boundary of the subtree being iterated over,
it would go to the next sibling of the root node.
Revision Changes Path
1.5 +4 -0 xml-xerces/java/src/org/apache/xerces/dom/NodeIteratorImpl.java
Index: NodeIteratorImpl.java
===================================================================
RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/dom/NodeIteratorImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- NodeIteratorImpl.java 2000/10/02 21:58:20 1.4
+++ NodeIteratorImpl.java 2000/11/27 22:49:11 1.5
@@ -300,6 +300,10 @@
}
}
+ if (node == fRoot) { //if Root has no kids
+ return null;
+ }
+
// if hasSibling, return sibling
result = node.getNextSibling();
if (result != null) return result;