This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug libgcj/9124] URLClassLoader.getResource() should return canonicalized file URLs


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]