[jdk8u-dev] RFR: 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
Sat Mar 22 05:26:24 UTC 2025


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.-

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

Commit messages:
 - Backport 8fce5275fc94ebc404a6a37f5ea0407140de63c1

Changes: https://git.openjdk.org/jdk8u-dev/pull/639/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk8u-dev&pr=639&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8339810
  Stats: 136 lines in 1 file changed: 20 ins; 32 del; 84 mod
  Patch: https://git.openjdk.org/jdk8u-dev/pull/639.diff
  Fetch: git fetch https://git.openjdk.org/jdk8u-dev.git pull/639/head:pull/639

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


More information about the jdk8u-dev mailing list