JDK-8322802 : Add testing for ZipFile.getEntry respecting the 'Language encoding' flag
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util.jar
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2024-01-01
  • Updated: 2024-01-08
  • Resolved: 2024-01-02
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 23
23 b04Fixed
Related Reports
Relates :  
Description
JDK-7009069 describes a bug where ZipFile.getEntry does not respect the 'Language encoding' flag, indicating that the entry's name and comment should be decoded using UTF-8 regardless of the charset passed to the ZipFile constructor.

This has later been fixed "accidentally", most probably by JDK-8243469.

While current testing verifies that the iteration use case ZipFile.entries() respects the flag, similar testing does not exists for the lookup case in ZipFile.getEntry.

We should extend the current testing in ZipCodings to also test ZipFile.getEntry. This is also a good opportunity to convert the test to JUnit 5 and make it a parameterized test.
Comments
Changeset: 2cf5f013 Author: Eirik Bjørsnøs <eirbjo@openjdk.org> Date: 2024-01-02 20:31:38 +0000 URL: https://git.openjdk.org/jdk/commit/2cf5f0139740c6d822225848fc1691e144a6ed1a
02-01-2024

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/17207 Date: 2023-12-31 18:07:33 +0000
01-01-2024