ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@locus.apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs Delete.java
Date Mon, 18 Dec 2000 16:53:35 GMT
bodewig     00/12/18 08:53:34

  Modified:    src/main/org/apache/tools/ant/taskdefs Delete.java
  Log:
  Avoid NullPointerException in <delete> if the current user is not
  allowed to list the contents of a directory.
  
  Reported by:	"NIkhil R. Deshpande" <nikhild@flashmail.com>
  
  Revision  Changes    Path
  1.11      +1 -0      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java
  
  Index: Delete.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Delete.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- Delete.java	2000/12/05 03:53:15	1.10
  +++ Delete.java	2000/12/18 16:53:33	1.11
  @@ -270,6 +270,7 @@
   
       protected void removeDir(File d) {
           String[] list = d.list();
  +        if (list == null) list = new String[0];
           for (int i = 0; i < list.length; i++) {
               String s = list[i];
               File f = new File(d, s);
  
  
  

Mime
View raw message