Patch: FYI: URLClassLoader fixlet
Tom Tromey
tromey@redhat.com
Mon Sep 16 14:38:00 GMT 2002
I'm checking this in.
With this patch, the location of a file loaded from a jar file is no
longer a "jar:" URL, but instead a "file:" URL. This matches the
behavior of the JDK.
I'll check something similar in to Classpath.
Tom
Index: ChangeLog
from Tom Tromey <tromey@redhat.com>
* java/net/URLClassLoader.java (findClass): Code source for a
class from a jar is not necessarily a jar: URL.
Index: java/net/URLClassLoader.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/net/URLClassLoader.java,v
retrieving revision 1.8
diff -u -r1.8 URLClassLoader.java
--- java/net/URLClassLoader.java 13 Sep 2002 11:39:47 -0000 1.8
+++ java/net/URLClassLoader.java 16 Sep 2002 21:32:44 -0000
@@ -119,7 +119,7 @@
for (int i = 0; i < urls.length; i++)
{
- // Convert a Jar File URL into a Jar URL is possible.
+ // Convert a Jar File URL into a Jar URL if possible.
URL u = jarFileize(urls[i]);
path.addElement (u);
@@ -266,7 +266,7 @@
int i = u.indexOf ('!');
if (i >= 0)
u = u.substring (0, i);
- url = new URL("jar", "", u);
+ url = new URL(u);
source = new CodeSource(url, certificates);
}
More information about the Java-patches
mailing list