On Mon, 7 Oct 2024 00:04:40 GMT, ExE Boss <d...@openjdk.org> wrote: >> Markus KARG has updated the pull request incrementally with one additional >> commit since the last revision: >> >> fixup! Reader.of(String) >> >> Dropping non-public JavaDocs > > src/java.base/share/classes/java/io/Reader.java line 172: > >> 170: Objects.requireNonNull(source); >> 171: >> 172: return new Reader() { > > Maybe make this into a package‑private `CharSequenceReader` so that > [`StringReader::close()`] doesn’t have to use a try‑catch. > > [`StringReader::close()`]: > https://docs.oracle.com/en/java/javase/23/docs/api/java.base/java/io/StringReader.html#close()
I don't think that try-catch is too much of a bloat compared to the extra license header and imports from the explicit `CharSequenceReader.java` file. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/21371#discussion_r1789479742