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

Bernd duke at openjdk.org
Sun Oct 6 18:15:35 UTC 2024


On Sun, 6 Oct 2024 17:31:42 GMT, Markus KARG <duke at openjdk.org> wrote:

>> I recommend adding another test case against an ad-hoc `CharSequence` implementation wrapping a `char[]` in a record, to ensure the generic paths in `read(char[], int, int)` works as intended.
>
> Good idea. But instead, we could also add a new API `CharSequence.of(char[])` and test *that* class? WDYT?

> Good idea. But instead, we could also add a new API `CharSequence.of(char[])` and test _that_ class? WDYT?

Both you need to test the generic case anyway.

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

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


More information about the core-libs-dev mailing list