diff --git a/src/main/org/apache/tools/ant/DirectoryScanner.java b/src/main/org/apache/tools/ant/DirectoryScanner.java index d880e7b42..edb82c3af 100644 --- a/src/main/org/apache/tools/ant/DirectoryScanner.java +++ b/src/main/org/apache/tools/ant/DirectoryScanner.java @@ -808,6 +808,14 @@ public class DirectoryScanner * @see #slowScan */ protected void scandir(File dir, String vpath, boolean fast) { + if (dir == null) { + throw new BuildException("dir must not be null."); + } else if (!dir.exists()) { + throw new BuildException(dir + " doesn't exists."); + } else if (!dir.isDirectory()) { + throw new BuildException(dir + " is not a directory."); + } + // avoid double scanning of directories, can only happen in fast mode if (fast && hasBeenScanned(vpath)) { return; diff --git a/src/main/org/apache/tools/ant/taskdefs/Javac.java b/src/main/org/apache/tools/ant/taskdefs/Javac.java index 1e815b12f..7953508f5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Javac.java +++ b/src/main/org/apache/tools/ant/taskdefs/Javac.java @@ -567,7 +567,7 @@ public class Javac extends MatchingTask { /** * Sets the target VM that the classes will be compiled for. Valid * values depend on the compiler, for jdk 1.4 the valid values are - * "1.1", "1.2", "1.3" and "1.4". + * "1.1", "1.2", "1.3", "1.4" and "1.5". * @param target the target VM */ public void setTarget(String target) {