On Fri, 14 Feb 2025 07:41:26 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
> Can I please get a review of this change which proposes to properly close the > `Inflater` instance used in > `jdk.internal.jimage.decompressor.ZipDecompressor.decompress()` method? This > addresses https://bugs.openjdk.org/browse/JDK-8349909. > > As noted in that issue, in the exceptional case in the `decompress()` method, > the `Inflater` instance isn't currently being closed. The commit in this PR > uses a try/finally block to `end()` the `Inflater` instance. > > Unlike some other places within the JDK, the code in > `jdk.internal.jimage.decompressor.ZipDecompressor` is expected to maintain > Java 8 (API) compatibility, so this part of the code cannot use the newly > introduced `Inflater.close()` method and thus cannot use the > try-with-resources statement too. > > No new tests have been added given the nature of this change. A noreg label > has been added to the JBS issue. Existing tests in tier1, tier2 and tier3 > continue to pass with this change. Marked as reviewed by lancea (Reviewer). ------------- PR Review: https://git.openjdk.org/jdk/pull/23626#pullrequestreview-2618379931