ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From anto...@apache.org
Subject cvs commit: ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional JXPath.java
Date Thu, 05 Jun 2003 07:53:21 GMT
antoine     2003/06/05 00:53:20

  Modified:    proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional
                        JXPath.java
  Log:
  fixes NPE on iterator causing JXPath to fail with exception if expression returns no results
  PR: 20272
  Submitted by: Nick Chalko (nick at chalko dot com)
  
  Revision  Changes    Path
  1.9       +1 -1      ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional/JXPath.java
  
  Index: JXPath.java
  ===================================================================
  RCS file: /home/cvs/ant/proposal/embed/src/java/org/apache/tools/ant/taskdefs/optional/JXPath.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- JXPath.java	29 Dec 2002 05:57:38 -0000	1.8
  +++ JXPath.java	5 Jun 2003 07:53:20 -0000	1.9
  @@ -129,7 +129,7 @@
   
               Iterator iter = jxpathCtx.iterate(name);
   
  -            if(iter==null){
  +            if(iter==null||!iter.hasNext()){
                   return "null";
               }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message