This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Patch: FYI: URLClassLoader fixlet
- From: Tom Tromey <tromey at redhat dot com>
- To: Java Patch List <java-patches at gcc dot gnu dot org>
- Date: 16 Sep 2002 15:36:57 -0600
- Subject: Patch: FYI: URLClassLoader fixlet
- Reply-to: tromey at redhat dot com
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);
}