[jdk11u-dev] RFR: 8339810: Clean up the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract

Andrew John Hughes andrew at openjdk.org
Tue Mar 25 17:35:22 UTC 2025


On Sat, 22 Mar 2025 05:19:06 GMT, Martin Balao <mbalao at openjdk.org> wrote:

> Hi,
> 
> I'd like to have a review for the 11u backport of [8339810](https://bugs.openjdk.org/browse/JDK-8339810).
> 
> Changes to the 17u patch:
> 
>  * src/jdk.jartool/share/classes/sun/tools/jar/Main.java
>    * Copyright date. Manually fixed.
>    * 11u does not have 8276766 so the context is different and changes do not apply cleanly.
> 
> Testing:
> 
>  * No regressions found in jdk/sun/security/tools/jarsigner.
> 
> Thanks,
> Martin.-

Backport looks good with appropriate change of `setZipEntryTime(x, e.getTime())` to `x.setTime(e.getTime())` matching the reversal of the changes in [JDK-8276766](https://bugs.openjdk.org/browse/JDK-8276766). Builds and tests pass without regression.

-------------

Marked as reviewed by andrew (Reviewer).

PR Review: https://git.openjdk.org/jdk11u-dev/pull/3016#pullrequestreview-2714615528


More information about the jdk-updates-dev mailing list