Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
0.23.1
-
None
-
Reviewed
Description
Calling JarFinder.getJar() throws an exception if user has a "META-INF/MANIFEST.MF" in the same directory of the .class specified.
Jarfinder.getJar() call createJar() that always create a new Manifest and then add all the files contained in the .class directory.
To reproduce the problem in a simple way you can create a SimpleClass.java in the same directory create a META-INF/MANIFEST.MF and then call JarFinder.getJar(SimpleClass.class)
>> Caused by: java.util.zip.ZipException: duplicate entry: META-INF/MANIFEST.MF >> at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:175) >> at java.util.jar.JarOutputStream.putNextEntry(JarOutputStream.java:92) >> at org.apache.hadoop.util.JarFinder.zipDir(JarFinder.java:66) >> at org.apache.hadoop.util.JarFinder.zipDir(JarFinder.java:62) >> at org.apache.hadoop.util.JarFinder.zipDir(JarFinder.java:44) >> at org.apache.hadoop.util.JarFinder.createJar(JarFinder.java:93) >> at org.apache.hadoop.util.JarFinder.getJar(JarFinder.java:134)