On Mon, 21 Aug 2023 14:26:39 GMT, Vyom Tewari <vtew...@openjdk.org> wrote:
> With the current implementation of BufferedOutputStream if you close the > stream and try to write to the closed stream BufferedOutputStream does not > throw an IOException until the internal buffer is full. To fix this issue i > added a private "ensureOpen" function to BufferedOutputStream which will > check if the underline stream is open. If the underline stream is closed > "ensureOpen" will throw the IOException. `write(int)` should have an `ensureOpen` check too. ------------- PR Comment: https://git.openjdk.org/jdk/pull/15361#issuecomment-1686499580