On Thu, 12 Sep 2024 13:44:34 GMT, Maurizio Cimadamore <[email protected]>
wrote:
>> Per Minborg has updated the pull request with a new target base due to a
>> merge or a rebase. The incremental webrev excludes the unrelated changes
>> brought in by the merge/rebase. The pull request contains 10 additional
>> commits since the last revision:
>>
>> - Remove trailing blanks
>> - Add back extra line break
>> - Add copyright year
>> - Update copyright year
>> - Revoke change to copyright year
>> - Reinstate code
>> - Move logic to doc
>> - Merge branch 'master' into ms-string-known-length
>> - Add copyright year
>> - Add MemorySegment::getString overload
>
> src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 1288:
>
>> 1286: * over the decoding process is required.
>> 1287: * <p>
>> 1288: * Getting a String from a {@code segment} with a known byte
>> {@code offset} and
>
> Suggestion:
>
> * Getting a string from a {@code segment} with a known byte {@code
> offset} and
I would drop all the `{@code ... }` here. E.g.
Getting a string from a segment with known byte offset and byte length can be
done like so:
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20725#discussion_r1756907925