[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
Tue Mar 25 15:52:29 UTC 2025


On Mon, 24 Mar 2025 15:22:46 GMT, Jan Kratochvil <jkratochvil at openjdk.org> wrote:

>>> 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)
>> 
>> I couldn't track down the suggested change to any bug. Can you help me with that? I've seen that 8339810 for example keeps the comment `// add the remaining new files`.
>
>> I couldn't track down the suggested change to any bug. Can you help me with that? I've seen that 8339810 for example keeps the comment `// add the remaining new files`.
> 
> It depends what is the goal. IMO during backporting https://github.com/openjdk/jdk/commit/8fce5275fc94ebc404a6a37f5ea0407140de63c1 does only reindent the block. So one should get the original jdk8 block and reindent it.
> 
> But then the comment really should be there, that is a mistake in my patch. The only difference is `(File f: entries)` vs. `(File f : entries)` which does not really matter. Let's forget about my comment.

Thanks for clarifying, @jankratochvil . Yes, I'd suggest to keep the code as it looks after the fix in newer releases (when possible) in the hope that the next overlapping backport applies cleanly.

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

PR Comment: https://git.openjdk.org/jdk8u-dev/pull/639#issuecomment-2751728856


More information about the jdk8u-dev mailing list