JDK-8156999 : Present or not present anomaly with MR JARs
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Other
  • Submitted: 2016-05-14
  • Updated: 2016-07-20
  • Resolved: 2016-07-20
Related Reports
Relates :  
Description
Consider a JAR file with the following entries:

META-INF/
META-INF/MANIFEST.MF
foo
META-INF/versions/
META-INF/versions/9/
META-INF/versions/9/bar
META-INF/versions/9/foo

The main manifest has "Multi-Release: true". 

If the JAR file is opened with the new constructor and JarFile.Release.RUNTIME then the contents of the JAR file that the entries or stream methods reports is:

META-INF/
META-INF/MANIFEST.MF
foo

However, if we use JarFile's getEntry("bar") then bar will be found.

We need to see how this anomaly can be fixed without introducing a performance issue.

Comments
Fixed when fix for JDK-8157524 was integrated.
20-07-2016