Browse Source

Do not try to load from jars which don't exist

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@267907 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 25 years ago
parent
commit
c30a78b74e
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/main/org/apache/tools/ant/AntClassLoader.java

+ 4
- 0
src/main/org/apache/tools/ant/AntClassLoader.java View File

@@ -178,6 +178,10 @@ public class AntClassLoader extends ClassLoader {
*/ */
private InputStream getResourceStream(File file, String resourceName) { private InputStream getResourceStream(File file, String resourceName) {
try { try {
if (!file.exists()) {
return null;
}
if (file.isDirectory()) { if (file.isDirectory()) {
File resource = new File(file, resourceName); File resource = new File(file, resourceName);
if (resource.exists()) { if (resource.exists()) {


Loading…
Cancel
Save