tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ru...@locus.apache.org
Subject cvs commit: jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs Javac.java
Date Fri, 31 Dec 1999 05:20:57 GMT
rubys       99/12/30 21:20:57

  Modified:    ant/src/main/org/apache/tools/ant/taskdefs Javac.java
  Log:
  NullPointerException when srcDir contains no matches in Javac
  
  Revision  Changes    Path
  1.16      +2 -1      jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs/Javac.java
  
  Index: Javac.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tools/ant/src/main/org/apache/tools/ant/taskdefs/Javac.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- Javac.java	1999/12/29 19:05:19	1.15
  +++ Javac.java	1999/12/31 05:20:57	1.16
  @@ -271,7 +271,8 @@
       private void scanDir(File srcDir, File destDir) {
   
   	String[] list = srcDir.list(new DesirableFilter());
  -	for (int i = 0; i < list.length; i++) {
  +	int len = (list==null ? 0 : list.length);
  +	for (int i = 0; i < len; i++) {
   	    String filename = list[i];
   	    File srcFile = new File(srcDir, filename);
   	    File destFile = new File(destDir, filename);
  
  
  

Mime
View raw message