Browse Source

Eliminate possible NPE; note that previous change

addressed bug 33118 at least partially.


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@277786 13f79535-47bb-0310-9956-ffa450edef68
master
Matthew Jason Benson 20 years ago
parent
commit
0777fa853a
1 changed files with 9 additions and 8 deletions
  1. +9
    -8
      src/main/org/apache/tools/ant/DirectoryScanner.java

+ 9
- 8
src/main/org/apache/tools/ant/DirectoryScanner.java View File

@@ -773,14 +773,15 @@ public class DirectoryScanner

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;


Loading…
Cancel
Save