patch from Bruno Dufour ... look in system classloader as a last resort

git-svn-id: https://wala.svn.sourceforge.net/svnroot/wala/trunk@1626 f5eafffb-2e1d-0410-98e4-8ec43c5233c4
This commit is contained in:
sjfink 2007-08-17 19:11:25 +00:00
parent 41070719f2
commit d0db9f480e
1 changed files with 6 additions and 0 deletions

View File

@ -193,6 +193,12 @@ public class FileProvider {
Trace.println("FileProvider got url: " + url + " for " + fileName);
}
if (url == null) {
// couldn't load it from the class loader. try again from the
// system classloader
File f = new File(fileName);
if (f.exists()) {
return f;
}
throw new FileNotFoundException(fileName);
} else {
return new File(filePathFromURL(url));