[jdk8u-dev] RFR: 8339810: Clean up the code in sun.tools.jar.Main to properly close resources and use ZipFile during extract
Jan Kratochvil
jkratochvil at openjdk.org
Mon Mar 24 11:35:19 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.-
It would be a little cleaner backport (preserving jdk8 code) with this change:
[entries.patch.txt](https://github.com/user-attachments/files/19428804/entries.patch.txt)
-------------
PR Comment: https://git.openjdk.org/jdk8u-dev/pull/639#issuecomment-2747810869
More information about the jdk8u-dev
mailing list