You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mk...@apache.org on 2002/09/11 20:47:42 UTC
cvs commit: xml-xalan/java/src/org/apache/xalan/extensions MethodResolver.java
mkwan 2002/09/11 11:47:42
Modified: java/src/org/apache/xalan/extensions MethodResolver.java
Log:
For Bugzilla 9731. Convert an empty NodeList to a null Node.
Revision Changes Path
1.28 +5 -2 xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java
Index: MethodResolver.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/extensions/MethodResolver.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- MethodResolver.java 22 Mar 2002 14:50:49 -0000 1.27
+++ MethodResolver.java 11 Sep 2002 18:47:41 -0000 1.28
@@ -845,8 +845,11 @@
// Xalan ensures that iter() always returns an
// iterator positioned at the beginning.
DTMIterator ni = xobj.iter();
- int handle = ni.nextNode();
- return ni.getDTM(handle).getNode(handle); // may be null.
+ int handle = ni.nextNode();
+ if (handle != DTM.NULL)
+ return ni.getDTM(handle).getNode(handle); // may be null.
+ else
+ return null;
}
else if(javaClass == java.lang.String.class)
{
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org