Closed tsulej closed 6 years ago
Hello.
Just downloaded it, "jar -tf" works fine for me with JDK 1.8.0_144.
Your stack trace is close to the one in this corrected bug: http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8182377 so you could just upgrade your JDK.
For some reason, the jar (which I built using JDK 8 and JarOutputStream, and not JDK 5 jar command as for previous versions) seem to have a zero-length entry after the manifest, which trigger the bug, as my output starts like this:
META-INF/MANIFEST.MF
net/ net/jafama/ net/jafama/CmnFastMath$MyTAsin.class (...)
For later versions I will try to get rid of this mysterious (???) and annoying entry.
Ok but I'm using this library as a dependency in my library. I can't assume and force users of my library to have latest java. So I stay with 2.1 till you manage to get rid of zero length file.
Maybe this can be helpful when I open with zip I see file "jafama-2.3.0"
You're right, it's worth to make a new version to make up for the JDK bug, which could hurt a lot of users. I'll make a 2.3.1 tomorrow (plus the delay for upload to central).
Jar file downloaded from maven seems to be corrupted.
$ jar -tf jafama-2.3.0.jar META-INF/MANIFEST.MF java.lang.NullPointerException at java.util.zip.ZipFile.getZipEntry(ZipFile.java:566) at java.util.zip.ZipFile.access$900(ZipFile.java:60) at java.util.zip.ZipFile$ZipEntryIterator.next(ZipFile.java:524) at java.util.zip.ZipFile$ZipEntryIterator.nextElement(ZipFile.java:499) at java.util.zip.ZipFile$ZipEntryIterator.nextElement(ZipFile.java:480) at sun.tools.jar.Main.list(Main.java:1118) at sun.tools.jar.Main.run(Main.java:293) at sun.tools.jar.Main.main(Main.java:1288)
$ java -version java version "1.8.0_66" Java(TM) SE Runtime Environment (build 1.8.0_66-b18) Java HotSpot(TM) 64-Bit Server VM (build 25.66-b18, mixed mode)