Browse Source

Actually may as well use ZipFile/ZipEntry since not using the JDK

manifest class - it cannot handle multiple Class-Path entries


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@273886 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 22 years ago
parent
commit
1ecd522f7e
1 changed files with 5 additions and 4 deletions
  1. +5
    -4
      src/main/org/apache/tools/ant/loader/AntClassLoader2.java

+ 5
- 4
src/main/org/apache/tools/ant/loader/AntClassLoader2.java View File

@@ -62,11 +62,12 @@ import org.apache.tools.ant.AntClassLoader;
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 @@ public class AntClassLoader2 extends AntClassLoader {
}
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;


Loading…
Cancel
Save