tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6738] - DependClassLoader12 choking on Manifests
Date Wed, 27 Feb 2002 18:23:54 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6738>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6738

DependClassLoader12 choking on Manifests





------- Additional Comments From emiller@planalytics.com  2002-02-27 18:23 -------
Ignore the previous patch (I had tweaked the original file).  Try this one:

--- DependClassLoader12.java.orig	Wed Feb 27 13:20:02 2002
+++ DependClassLoader12.java	Wed Feb 27 13:15:40 2002
@@ -70,6 +70,10 @@
  * 
  */
 public class DependClassLoader12 extends DependClassLoader {
+	
+    private final static String FILE_PROTOCOL = "file:";
+    private final static String BANG = "!";
+	
     DependClassLoader12() {
     }
     
@@ -115,6 +119,9 @@
             if ( "jar".equals(res.getProtocol()) ) {
               try {
 		  String JarN = res.getFile();
+		  if (JarN.startsWith(FILE_PROTOCOL)) JarN = JarN.substring
(FILE_PROTOCOL.length());
+		  int bang = JarN.indexOf(BANG);
+		  if (bang != -1) JarN = JarN.substring(0, bang);
 		  JarFile JarF = new JarFile(JarN);
 		  Manifest mf = JarF.getManifest();
 		  if(mf == null) // Jar may not be Java2

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message