This is the mail archive of the
gcc-prs@gcc.gnu.org
mailing list for the GCC project.
libgcj/9124: URLClassLoader.getResource() should return canonicalized file URLs
- From: mark at klomp dot org
- To: gcc-gnats at gcc dot gnu dot org
- Date: 2 Jan 2003 09:25:24 -0000
- Subject: libgcj/9124: URLClassLoader.getResource() should return canonicalized file URLs
- Reply-to: mark at klomp dot org
>Number: 9124
>Category: libgcj
>Synopsis: URLClassLoader.getResource() should return canonicalized file URLs
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Jan 02 01:26:01 PST 2003
>Closed-Date:
>Last-Modified:
>Originator: mark@klomp.org
>Release: unknown-1.0
>Organization:
>Environment:
>Description:
Currently URLClassLoader.getResource() might return relative file URLs if the given base file URL is relative. Other implementations return a absolute or canonicalized file URL in that case.
The cleanest fix would be to use File.toURL() on the File resource found. But File.toURL() is currently not correct on all platforms.
URLClassLoader is shared between libgcj and GNU Classpath but not all URL and File related classes have been merged yet so changes should be tested carfully against the two code bases.
See also the following thread:
http://gcc.gnu.org/ml/java-patches/2002-q4/msg00520.html
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted: