Browse Source

make bootstrap on JDK 1.2

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@348558 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 19 years ago
parent
commit
54b56c89e0
1 changed files with 9 additions and 1 deletions
  1. +9
    -1
      src/main/org/apache/tools/ant/AntClassLoader.java

+ 9
- 1
src/main/org/apache/tools/ant/AntClassLoader.java View File

@@ -500,7 +500,15 @@ public class AntClassLoader extends ClassLoader implements SubBuildListener {
+ " loader", Project.MSG_VERBOSE);
continue;
}
File libraryFile = new File(URLDecoder.decode(libraryURL.getFile()));
String decodedPath = null;
// try catch block required because URLDecoder.decode throws
// exception on JDK 1.2
try {
decodedPath = URLDecoder.decode(libraryURL.getFile());
} catch (Exception exc) {
throw new BuildException(exc);
}
File libraryFile = new File(decodedPath);
if (libraryFile.exists() && !isInPath(libraryFile)) {
addPathFile(libraryFile);
}


Loading…
Cancel
Save