RFR: 8341566: Add Reader.of(CharSequence) [v7]

Markus KARG duke at openjdk.org
Thu Oct 10 07:32:53 UTC 2024


On Wed, 9 Oct 2024 19:19:04 GMT, Chen Liang <liach at openjdk.org> wrote:

>> src/java.base/share/classes/java/io/Reader.java line 161:
>> 
>>> 159:      * {@code transferTo()} methods all throw {@code IOException}.
>>> 160:      *
>>> 161:      * <p> The returned reader supports the {@link #mark mark()} operation.
>> 
>> It may be useful to mention and link to the #reset method as well.
>
> I think `mark()`'s specification implies that if mark is supported, then `reset()` can be called. We can make that explicit on `mark()`.

I share both visions, so I have adopted #reset now as it does not harm IMHO.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/21371#discussion_r1794826763


More information about the core-libs-dev mailing list