re PR classpath/20198 (java.security.CodeSource.getLocation output is different than expected)
PR libgcj/20198 * java/net/URLClassLoader.java (FileURLLoader.getResource): File resources should all have canonicalized names. From-SVN: r104360
This commit is contained in:
parent
10d6edf84c
commit
ba80a8b264
2 changed files with 16 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2005-09-16 Anthony Green <green@redhat.com>
|
||||||
|
|
||||||
|
PR libgcj/20198
|
||||||
|
* java/net/URLClassLoader.java (FileURLLoader.getResource): File
|
||||||
|
resources should all have canonicalized names.
|
||||||
|
|
||||||
2005-09-15 Tom Tromey <tromey@redhat.com>
|
2005-09-15 Tom Tromey <tromey@redhat.com>
|
||||||
|
|
||||||
PR libgcj/16032:
|
PR libgcj/16032:
|
||||||
|
|
|
@ -610,9 +610,16 @@ public class URLClassLoader extends SecureClassLoader
|
||||||
/** get resource with the name "name" in the file url */
|
/** get resource with the name "name" in the file url */
|
||||||
Resource getResource(String name)
|
Resource getResource(String name)
|
||||||
{
|
{
|
||||||
File file = new File(dir, name);
|
try
|
||||||
if (file.exists())
|
{
|
||||||
return new FileResource(this, name, file);
|
File file = new File(dir, name).getCanonicalFile();
|
||||||
|
if (file.exists() && !file.isDirectory())
|
||||||
|
return new FileResource(this, file.path(), file);
|
||||||
|
}
|
||||||
|
catch (IOException e)
|
||||||
|
{
|
||||||
|
// Fall through...
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue