RFR: 8349907: jdk.tools.jlink.internal.plugins.ZipPlugin does not close the Deflater in exceptional cases
Jaikiran Pai
jpai at openjdk.org
Wed Feb 12 14:14:45 UTC 2025
Can I please get a review of this change in `jdk.tools.jlink.internal.plugins.ZipPlugin` which proposes to close the `Deflater` instance cleanly? This addresses https://bugs.openjdk.org/browse/JDK-8349907.
As noted in that issue, the `Deflater` instance wasn't being closed in the exception code path of this method. The commit in this PR merely changes the code to use a try-with-resources block on the `Deflater` instance.
No new tests have been introduced given the nature of the change. I've added a `noreg-hard` to the issue. Existing tier1, tier2 and tier3 tests continue to pass with this change without any related failures.
-------------
Commit messages:
- 8349907: jdk.tools.jlink.internal.plugins.ZipPlugin does not close the Deflater in exceptional cases
Changes: https://git.openjdk.org/jdk/pull/23588/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=23588&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8349907
Stats: 24 lines in 1 file changed: 4 ins; 6 del; 14 mod
Patch: https://git.openjdk.org/jdk/pull/23588.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/23588/head:pull/23588
PR: https://git.openjdk.org/jdk/pull/23588
More information about the core-libs-dev
mailing list