FULL PRODUCT VERSION :
A DESCRIPTION OF THE PROBLEM :
java.util.zip.ZipFile throws an NPE when processing the following jar file:
http://repo1.maven.org/maven2/org/seleniumhq/selenium/selenium-java/3.4.0/selenium-java-3.4.0-javadoc.jar
Using the Linux tool "unzip" shows the following:
$ unzip -v selenium-java-3.4.0-javadoc.jar
Archive: selenium-java-3.4.0-javadoc.jar
Length Method Size Cmpr Date Time CRC-32 Name
-------- ------ ------- ---- ---------- ----- -------- ----
0 Stored 0 0% 02-01-1985 00:00 00000000
-------- ------- --- -------
0 0 0% 1 file
java.util.zip.ZipFile shows:
$ jar tf selenium-java-3.4.0-javadoc.jar
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)
If this is a badly formatted jar file, I'd at least expect the ZipFile class to throw a checked Exception, ie. IOException or something that relates to bad jar file format.
Because of the unspecific NPE Eclipse is currently throwing unhandled errors.
REPRODUCIBILITY :
This bug can be reproduced always.