libgcj/9124: URLClassLoader.getResource() should return canonicalized file URLs

mark@klomp.org mark@klomp.org
Thu Jan 2 09:26:00 GMT 2003


>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:



More information about the Java-prs mailing list