RFR: 8369564: Provide a MemorySegment API to read strings with known lengths [v10]
Liam Miller-Cushon
cushon at openjdk.org
Fri Nov 21 14:26:01 UTC 2025
On Fri, 21 Nov 2025 14:13:52 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:
>> Liam Miller-Cushon has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review feedback
>>
>> * handle numChars + srcIndex overflow, and add tests
>> * replace yen with a character that round trips
>
> src/java.base/share/classes/jdk/internal/foreign/AbstractMemorySegmentImpl.java line 541:
>
>> 539: public String getString(long offset, Charset charset, long length) {
>> 540: if (length < 0) {
>> 541: throw new IllegalArgumentException();
>
> Could we have an exception message here please?
Thanks, I switched to `Utils.checkNonNegativeArgument`
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/28043#discussion_r2549915642
More information about the core-libs-dev
mailing list