tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util/depend DependClassLoader12.java
Date Thu, 28 Feb 2002 03:15:48 GMT
billbarker    02/02/27 19:15:48

  Modified:    src/share/org/apache/tomcat/util/depend
                        DependClassLoader12.java
  Log:
  Remove the file: and !classname from the jar-file name.
  
  Fix for bug #6738
  Submitted by: Eli Miller emiller@planalytics.com
  
  Revision  Changes    Path
  1.9       +9 -1      jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependClassLoader12.java
  
  Index: DependClassLoader12.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/depend/DependClassLoader12.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- DependClassLoader12.java	16 Jan 2002 05:06:01 -0000	1.8
  +++ DependClassLoader12.java	28 Feb 2002 03:15:48 -0000	1.9
  @@ -70,6 +70,10 @@
    * 
    */
   public class DependClassLoader12 extends DependClassLoader {
  +	
  +    private final static String FILE_PROTOCOL = "file:";
  +    private final static String BANG = "!";
  +	
       DependClassLoader12() {
       }
       
  @@ -115,7 +119,11 @@
               if ( "jar".equals(res.getProtocol()) ) {
                 try {
   		  String JarN = res.getFile();
  -		  JarFile JarF = new JarFile(JarN);
  +		  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
   		      throw new IOException("No Manifest");
  
  
  

--
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