Browse Source

Be a little more defensive in a protected method of a non-final public class, PR 26737

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@276074 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
cc9f4f71f5
2 changed files with 9 additions and 1 deletions
  1. +8
    -0
      src/main/org/apache/tools/ant/DirectoryScanner.java
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Javac.java

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

@@ -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;


+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Javac.java View File

@@ -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) {


Loading…
Cancel
Save