On Wed, 9 Oct 2024 06:59:25 GMT, Markus KARG <d...@openjdk.org> wrote:
>> src/java.base/share/classes/java/io/Reader.java line 182: >> >>> 180: private void ensureOpen() throws IOException { >>> 181: if (isClosed) >>> 182: throw new IOException("Stream closed"); >> >> Should the exception text instead be "Reader closed" and also the code >> comment a couple of lines above, replace "stream" to "reader"? > > The complete implementation was copied from "StringReader" (see > https://github.com/openjdk/jdk/blob/d809bc0e21b145758f21c4324772faf6aa6a276a/src/java.base/share/classes/java/io/StringReader.java#L57), > so it was "Stream closed" there already, and "StringReader" now refers to > this new code location. I deliberately did not modify anything else but the > essentially needed parts. If we change this text here, this might be > unexpected by existing applications. Okay, it's reasonable to keep it in this form then. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21371#discussion_r1792984990