geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d...@apache.org
Subject svn commit: r400134 - /geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/classloader/JarFileUrlStreamHandler.java
Date Fri, 05 May 2006 18:36:54 GMT
Author: dain
Date: Fri May  5 11:36:52 2006
New Revision: 400134

URL: http://svn.apache.org/viewcvs?rev=400134&view=rev
Log:
Fixed bug where jar URL was returned that did not contain a protocol on the nested url.

Modified:
    geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/classloader/JarFileUrlStreamHandler.java

Modified: geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/classloader/JarFileUrlStreamHandler.java
URL: http://svn.apache.org/viewcvs/geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/classloader/JarFileUrlStreamHandler.java?rev=400134&r1=400133&r2=400134&view=diff
==============================================================================
--- geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/classloader/JarFileUrlStreamHandler.java
(original)
+++ geronimo/branches/1.1/modules/kernel/src/java/org/apache/geronimo/kernel/classloader/JarFileUrlStreamHandler.java
Fri May  5 11:36:52 2006
@@ -22,6 +22,7 @@
 import java.net.MalformedURLException;
 import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
+import java.io.File;
 
 /**
  * @version $Rev$ $Date$
@@ -29,7 +30,8 @@
 public class JarFileUrlStreamHandler extends URLStreamHandler {
     public static URL createUrl(JarFile jarFile, JarEntry jarEntry) throws MalformedURLException
{
         JarFileUrlStreamHandler handler = new JarFileUrlStreamHandler(jarFile, jarEntry);
-        URL url = new URL("jar", "", -1, jarFile.getName() + "!/" + jarEntry.getName(), handler);
+        URL jarFileUrl = new File(jarFile.getName()).toURL();
+        URL url = new URL("jar", "", -1, jarFileUrl + "!/" + jarEntry.getName(), handler);
         handler.setExpectedUrl(url);
         return url;
     }



Mime
View raw message