You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mm...@locus.apache.org on 2000/03/07 00:33:11 UTC
cvs commit: xml-xalan/src/org/apache/xalan/xpath MutableNodeListImpl.java
mmidy 00/03/06 15:33:11
Modified: src/org/apache/xalan/xpath MutableNodeListImpl.java
Log:
Check for null parent when checking for the order of nodes. Also check for nodes being equal.
Revision Changes Path
1.11 +9 -1 xml-xalan/src/org/apache/xalan/xpath/MutableNodeListImpl.java
Index: MutableNodeListImpl.java
===================================================================
RCS file: /home/cvs/xml-xalan/src/org/apache/xalan/xpath/MutableNodeListImpl.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- MutableNodeListImpl.java 2000/03/06 20:13:28 1.10
+++ MutableNodeListImpl.java 2000/03/06 23:33:10 1.11
@@ -481,8 +481,16 @@
// Optimize for most common case
if(parent1 == parent2) // then we know they are siblings
{
- isNodeAfter = isNodeAfterSibling(
+ if (null != parent1)
+ isNodeAfter = isNodeAfterSibling(
parent1, node1, node2);
+ else
+ {
+ if(node1 == node2) // Same document?
+ return false;
+ else
+ return true;
+ }
}
else
{