AW: RFR: 8341566: Add Reader.of(CharSequence) [v15]
Markus Karg
markus at headcrashing.eu
Sun Nov 24 16:12:19 UTC 2024
Thank you so much for your kind reviews, Alan and Chen! :-)
I have slighly extended Alan's draft to let people better understand the differences, hence to be able to actively chose between StringReader and Reader.of(CharSequence):
"The static factory method `java.io.Reader.of(CharSequence)` has been added in get a `Reader` that reads characters from a `CharSequence` (`String` and `StringBuilder` are examples of a `CharSequence`). The returned `Reader` is more efficient than using a `java.io.StringReader` in some cases, as the latter requires conversion to `String` and synchronization."
Is that OK? I see the risk that people cannot make a well-founded decision without.
I am not a native English speaker. Do we need to add "TO" in "...added in TO get a Reader..."?
-Markus
-----Ursprüngliche Nachricht-----
Von: core-libs-dev [mailto:core-libs-dev-retn at openjdk.org] Im Auftrag von Alan Bateman
Gesendet: Sonntag, 24. November 2024 15:50
An: core-libs-dev at openjdk.org
Betreff: Re: RFR: 8341566: Add Reader.of(CharSequence) [v15]
On Sat, 23 Nov 2024 15:08:38 GMT, Markus KARG <duke at openjdk.org> wrote:
> I have drafted a release note for [JDK-8341566](https://bugs.openjdk.org/browse/JDK-8341566) in [JDK-8344910](https://bugs.openjdk.org/browse/JDK-8344910). Kindly asking for reviews! :-)
Thanks for creating this. I've edited it so that it is now focused on highlighting the new API and nothing else. Chen had some good suggestions too.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/21371#issuecomment-2496042639
More information about the core-libs-dev
mailing list