JDK-8185136 : Release Note: java.util.zip.ZipFile.getEntry() now always returns the ZipEntry instance with a '/' ended entry name for directory entry
  • Type: Sub-task
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Affected Version: 6u161,7u151,8u144
  • Priority: P2
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2017-07-24
  • Updated: 2018-07-09
  • Resolved: 2017-07-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 JDK 8
6u161Resolved 7u151Resolved 8u144Resolved
Description
The `java.util.zip.ZipEntry` API doc specifies "A directory entry is defined to be one whose name ends with a '/'". However, in previous JDK releases `java.util.zip.ZipFile.getEntry(String entryName)` may return a `ZipEntry` instance with an entry name that does not end with '/' for an existing zip directory entry when:

* the passed in argument `entryName` does not end with a '/', and
* there is a matching zip directory entry with name `entryName` + '/' in the zip file. 

With this release, the name of the `ZipEntry` instance returned from `java.util.zip.ZipFile.getEntry()` always ends with '/' for any zip directory entry.

To revert to the previous behavior, set the system property `jdk.util.zip.ensureTrailingSlash` to "false".

This change was made in order to fix a regression introduced in JDK 8u141 when verifying signed JARs and has caused some WebStart applications to fail to load. See JDK-8184993 for more information.

Comments
8U144 Release Note has been updated and staged on OTN.
25-07-2017