Patch: URLClassLoader change
Tom Tromey
tromey@redhat.com
Mon Dec 30 14:35:00 GMT 2002
>>>>> "Mark" == Mark Wielaard <mark@klomp.org> writes:
Mark> Yes, the patch will fix that and give file:./BadURL.java.
I'd prefer we get an absolute path if possible.
I did some debugging of this.
I don't understand why URLClassLoader.FileResource.getURL uses the
constructor it uses. In this code we already know that `file' has the
full path. Why not:
new URL("file", "", -1, file.toString(),
loader.classloader.getURLStreamHandler("file"));
This seemed to work for me, but perhaps I'm missing something. Maybe
the separators are incorrect on Windows? What do you think of this?
If it is really not possible to cleanly fix this, then go ahead and
check in your patch. If you could, also submit a PR so we know to fix
this in the future.
The `noCert' part of the patch should definitely go in. Thanks.
Tom
More information about the Java-patches
mailing list