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

Martin Balao mbalao at openjdk.org
Thu Mar 27 22:16:29 UTC 2025


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

> Hi,
> 
> I'd like to have a review for the 8u backport of [8339810](https://bugs.openjdk.org/browse/JDK-8339810).
> 
> Changes to the 11u patch:
> 
>  * Paths.
> 
>  * jdk/src/share/classes/sun/tools/jar/Main.java
>    * Copyright date. Manually fixed.
>    * 8u does not have 8199871, 8058520, 8114827, 8156497, 8142968, 8172432, 8217375, 8169069 so the context is different and changes do not apply cleanly.
>    * I decided to include the part of 8217375 affecting Main.java because it's related to resources leakage, relevant to 8339810. Given that this part is an insignificant part of 8217375, I propose not add a reference and give the (misleading) impression that it's a full backport of it.
> 
> Testing:
> 
>  * No regressions found in jdk/sun/security/tools/jarsigner.
> 
> Thanks,
> Martin.-

This pull request has now been integrated.

Changeset: af6e57b7
Author:    Martin Balao <mbalao at openjdk.org>
URL:       https://git.openjdk.org/jdk8u-dev/commit/af6e57b7191ecc23d55658a97228c7311a2c2268
Stats:     136 lines in 1 file changed: 20 ins; 32 del; 84 mod

8339810: Clean up the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract

Reviewed-by: yan, andrew
Backport-of: 8fce5275fc94ebc404a6a37f5ea0407140de63c1

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

PR: https://git.openjdk.org/jdk8u-dev/pull/639


More information about the jdk8u-dev mailing list