RFR: 8341566: Adding factory for non-synchronized CharSequence Reader [v4]

Markus KARG duke at openjdk.org
Tue Oct 8 11:29:03 UTC 2024


On Mon, 7 Oct 2024 07:39:16 GMT, Alan Bateman <alanb at openjdk.org> wrote:

>> I do not see what is "confusing" in that case, as the caller still gets what he intends: a reader for the passed source. I also wonder how likely that case actually is. Anyways, I may be biased as I proposed `of`.
>> 
>> @AlanBateman WDYT?
>
> You'll get different opinions on naming, personally I think Reader.of(cs) is very readable at use-sites. There are several other static methods named "of" added in other areas in recent years.

So let's go with `Reader.of()` unless nobody has stronger feelings against it. 😃

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

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


More information about the core-libs-dev mailing list