ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/loader AntClassLoader2.java
Date Sun, 26 Jan 2003 23:43:38 GMT
conor       2003/01/26 15:43:37

  Modified:    src/main/org/apache/tools/ant/loader AntClassLoader2.java
  Log:
  Actually may as well use ZipFile/ZipEntry since not using the JDK
  manifest class - it cannot handle multiple Class-Path entries
  
  Revision  Changes    Path
  1.4       +5 -4      jakarta-ant/src/main/org/apache/tools/ant/loader/AntClassLoader2.java
  
  Index: AntClassLoader2.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/loader/AntClassLoader2.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -w -u -r1.3 -r1.4
  --- AntClassLoader2.java	26 Jan 2003 22:59:05 -0000	1.3
  +++ AntClassLoader2.java	26 Jan 2003 23:43:37 -0000	1.4
  @@ -62,11 +62,12 @@
   import org.apache.tools.ant.Project;
   import java.util.jar.Manifest;
   import java.util.jar.JarFile;
  +import java.util.zip.ZipFile;
   import java.util.jar.Attributes;
   import java.util.jar.Attributes.Name;
   import java.net.URL;
   import java.net.MalformedURLException;
  -import java.util.jar.JarEntry;
  +import java.util.zip.ZipEntry;
   import java.util.StringTokenizer;
   import org.apache.tools.ant.util.FileUtils;
   
  @@ -272,12 +273,12 @@
           }
           
           String classpath = null;
  -        JarFile jarFile = null;
  +        ZipFile jarFile = null;
           InputStream manifestStream = null;
           try {
  -            jarFile = new JarFile(pathComponent);
  +            jarFile = new ZipFile(pathComponent);
               manifestStream 
  -                = jarFile.getInputStream(new JarEntry("META-INF/MANIFEST.MF"));
  +                = jarFile.getInputStream(new ZipEntry("META-INF/MANIFEST.MF"));
   
               if (manifestStream == null) {
                   return;
  
  
  

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


Mime
View raw message