RFR: 8369181: InflaterOutputStream: writing after finish() results in IllegalStateException instead of an IOException

Jaikiran Pai jpai at openjdk.org
Thu Feb 26 12:25:05 UTC 2026


On Thu, 26 Feb 2026 12:03:51 GMT, Daniel Fuchs <dfuchs at openjdk.org> wrote:

>  I wonder if it could/should be included in ensureOpen()? Maybe, or maybe not - I see ensureOpen() is called from finish() too. So if we moved that check to ensureOpen() then calling finish() twice in succession would throw. 

Right, in my initial experiment I had that check for closed inflater within ensureOpen() itself. But like you note, it will introduce these additional behavioural changes.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/29935#discussion_r2858727210


More information about the core-libs-dev mailing list