RFR JDK-8211728,JarFile::versionedStream() does not filter META-INF resources in versioned stream
Xueming Shen
xueming.shen at oracle.com
Fri Oct 5 16:48:17 UTC 2018
Hi
Please help review the change for JDK-8211728
issue: https://bugs.openjdk.java.net/browse/JDK-8211728
webrev: http://cr.openjdk.java.net/~sherman/8211728/webrev
The "intention" of JEP 238 is that the resources under META-INF
can't/shouldn't
be versioned. But it appears this is not documented & specified
clearly/explicitly.
And the JarFile implementation has loophole dealing with this case. The spec
clarification is being traced/addressed separately via JDK-8211758. The
change
proposed here is to fix the JarFile implementation.
Note: the direct trigger of the bug is that versionedStream() does not
expect the
possibility VersinedEntry() might return null when the entry is actually
under
META-INF/versions/{n}/META-INF, in which it has a "basename" of META-INF/xxx
but doesn't have a real entry under /META-INF (in which the
getVersionEntry(...)
is invoked with (name="META-INF/xxx", je=null).
Thanks,
Sherman
More information about the core-libs-dev
mailing list