You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/02/27 19:23:54 UTC

DO NOT REPLY [Bug 6738] - DependClassLoader12 choking on Manifests

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:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>