ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mben...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant DirectoryScanner.java
Date Thu, 03 Mar 2005 20:42:43 GMT
mbenson     2005/03/03 12:42:43

  Modified:    src/main/org/apache/tools/ant DirectoryScanner.java
  Log:
  Eliminate possible NPE; note that previous change
  addressed bug 33118 at least partially.
  
  Revision  Changes    Path
  1.92      +9 -8      ant/src/main/org/apache/tools/ant/DirectoryScanner.java
  
  Index: DirectoryScanner.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v
  retrieving revision 1.91
  retrieving revision 1.92
  diff -u -r1.91 -r1.92
  --- DirectoryScanner.java	2 Mar 2005 22:43:54 -0000	1.91
  +++ DirectoryScanner.java	3 Mar 2005 20:42:43 -0000	1.92
  @@ -773,14 +773,15 @@
   
                   if (basedir == null) {
                       illegal = new IllegalStateException("No basedir set");
  -                }
  -                if (!basedir.exists()) {
  -                    illegal = new IllegalStateException("basedir " + basedir
  -                                                    + " does not exist");
  -                }
  -                if (!basedir.isDirectory()) {
  -                    illegal = new IllegalStateException("basedir " + basedir
  -                                                    + " is not a directory");
  +                } else {
  +                    if (!basedir.exists()) {
  +                        illegal = new IllegalStateException("basedir " + basedir
  +                                                        + " does not exist");
  +                    }
  +                    if (!basedir.isDirectory()) {
  +                        illegal = new IllegalStateException("basedir " + basedir
  +                                                        + " is not a directory");
  +                    }
                   }
                   if (illegal != null) {
                       throw illegal;
  
  
  

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


Mime
View raw message