RFR: 8225763: Inflater and Deflater should implement AutoCloseable [v4]
Jaikiran Pai
jpai at openjdk.org
Mon Dec 2 05:31:40 UTC 2024
On Wed, 27 Nov 2024 07:18:43 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Hello Alan,
>>
>>> If it goes ahead as reviewed, then we'll to do some outreach and be prepared to back out this change in the event that breakage is reported before GA.
>>
>> I agree that if the `final close()` causes issues, then backing this change out and reconsidering a non-final `close()` would be the right thing to do. Once/if this gets integrated into 24, I will work with the outreach team to have this change noted in their EA mails.
>
> Adding a final close method is both source and binary incompatible so I don't think the CSR can be approved without more justification. So I think the issues of introducing a non-final close should be examined again.
Hello Alan, I've now reverted the change which had marked this new `close()` method on `Inflater` and `Deflater` as `final`. With this update to this PR, this method is no longer `final`. Given this change, one additional sentence has been added to the Inflater/Deflater class level javadoc, in `@apiNote` section providing guidance to the subclasses on which method to override for cleaning up resources they hold:
>
> Subclasses should override {@linkplain #end()} to clean up the resources acquired by the subclass.
>
No other changes have been done.
Requesting your and other's inputs if this updated change looks reasonable.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/19675#discussion_r1865246073
More information about the core-libs-dev
mailing list