You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sb...@apache.org on 2001/06/17 23:42:30 UTC
cvs commit: xml-xalan/java/src/org/apache/xpath/functions FuncLast.java
sboag 01/06/17 14:42:30
Modified: java/src/org/apache/xpath/functions FuncLast.java
Log:
Defensivly check for the context node list being null.
Revision Changes Path
1.10 +8 -2 xml-xalan/java/src/org/apache/xpath/functions/FuncLast.java
Index: FuncLast.java
===================================================================
RCS file: /home/cvs/xml-xalan/java/src/org/apache/xpath/functions/FuncLast.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- FuncLast.java 2001/06/15 05:15:43 1.9
+++ FuncLast.java 2001/06/17 21:42:29 1.10
@@ -100,8 +100,14 @@
return iter.getLastPos(xctxt);
DTMIterator cnl = xctxt.getContextNodeList();
- int count = cnl.getLength();
- // System.out.println("count: "+count);
+ int count;
+ if(null != cnl)
+ {
+ count = cnl.getLength();
+ // System.out.println("count: "+count);
+ }
+ else
+ count = 0;
return count;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org