RFR: 8066583: DeflaterInput/OutputStream and InflaterInput/OutputStream should explain responsibility for freeing resources [v6]
Chen Liang
liach at openjdk.org
Tue Apr 1 14:53:23 UTC 2025
On Tue, 1 Apr 2025 14:22:22 GMT, Jaikiran Pai <jpai at openjdk.org> wrote:
>> Is it impossible for another compliant implementation of Java SE to do so?
>
> It's hard for me to guess what prompted that question, but I'll take a guess - are you asking this question to decide whether we should reword the pre-existing javadoc on these constructors to explicitly state that a new decompressor/compressor instance gets created for each instance of the stream? If so, then my opinion is that we shouldn't change that part of the existing doc.
>
> If you meant something else, then please add the details and we can decide if any additional changes are necessary to the text.
My opinion is that: if it is possible for another implementation to share the backing in/deflator (such as via thread-local instances) that does not always need to be closed when an in/output stream is closed, then we should not specify in a way that rules out such an implementation.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/23655#discussion_r2023022774
More information about the core-libs-dev
mailing list