Patch: URLClassLoader change
Mark Wielaard
mark@klomp.org
Sun Dec 29 14:05:00 GMT 2002
Hi,
On Tue, 2002-12-10 at 21:07, Mark Wielaard wrote:
> On Tue, 2002-12-10 at 00:53, Tom Tromey wrote:
> > The JDK uses absolute (actually canonical -- I tested) paths in its
> > CodeSource objects. I think this makes sense; this is what the
> > appended implements.
>
> Thanks for doing the research. It certainly makes sense to do this.
But it was a lot of trouble to get this right. See my previous patch for
directories. And for Windows based file systems it is a real hassle to
get it correct in all cases since file URLs use forward slashes but File
paths use backward slashes. Translating from URL to File and back is
nasty in that case.
I discussed this with Jeroen Frijters which has used the Classpath
libraries to get Eclipse running on dotNet.
<http://radio.weblogs.com/0109845/2002/12/28.html#a76>
And we agreed that taking all canonicalization out of URLClassLoader was
the best approach. (He also found the noCert bug). So I propose the
following patch (which supersedes my earlier one):
2002-12-28 Mark Wielaard <mark@klomp.org>
Jeroen Frijters <jeroen@sumatra.nl>
* java/net/URLClassLoader.java (Resource.getCodeSource):
Fix check certs == null.
(getCanonicalFileURL): Removed method.
(JarURLLoader): Don't call removed method.
(FileURLLoader): Likewise.
(FileURLLoader.getResource): Don't canonicalize file name.
With his patch all Mauve URLClassLoader tests pass, there are no
regressions and it makes Eclipse run as before.
OK for mainline and branch?
Cheers,
Mark
-------------- next part --------------
A non-text attachment was scrubbed...
Name: URLClassLoader.patch2
Type: text/x-patch
Size: 2363 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20021229/90a545fd/attachment.bin>
More information about the Java-patches
mailing list