This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/9124] URLClassLoader.getResource() should return canonicalized file URLs
- From: "mark at klomp dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 8 Jun 2003 08:47:59 -0000
- Subject: [Bug libgcj/9124] URLClassLoader.getResource() should return canonicalized file URLs
- References: <20030102012601.9124.mark@klomp.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9124
------- Additional Comments From mark@klomp.org 2003-06-08 08:47 -------
Subject: Re: URLClassLoader.getResource() should return
canonicalized file URLs
> can you make small testcase for this (is there one in mauve?), or confirm whether this is still a
> problem? Thanks,
There are some test cases in
http://gcc.gnu.org/ml/java-patches/2002-q4/msg00529.html for a related
problem.
And the following is avery simple test case.
import java.net.URL;
import java.net.URLClassLoader;
public class T
{
public static void main(String[] args) throws Exception
{
URL[] urls = new URL[1];
urls[0] = new URL("file:.");
URLClassLoader uc = new URLClassLoader(urls);
System.out.println(uc.getResource("test"));
}
}
Mkae sure to have a test file in the current directory.
It seems to be fixed on my system, but this is tricky code that works
differently on different (file)systems and is partly shared with
upstream (GNU Classpath). I will put it on my list to check carefully.