RFR: 8345292: Improve javadocs for MemorySegment::getStrings defining word boundary cases [v2]
Maurizio Cimadamore
mcimadamore at openjdk.org
Wed Jun 11 17:20:14 UTC 2025
On Tue, 10 Jun 2025 17:01:24 GMT, Per Minborg <pminborg at openjdk.org> wrote:
>> This PR proposes to improve the 'MemorySegment.getString(long offset, Charset charset)` method documentation with respect to multi-octet concerns.
>
> Per Minborg has updated the pull request incrementally with one additional commit since the last revision:
>
> Update after comments
src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 1307:
> 1305: * return new String(bytes, charset);
> 1306: * }
> 1307: * @implNote If the {@linkplain #byteSize()} of this segment is not evenly dividable
can we say more directly "if the size is not a multiple of ..."
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/25715#discussion_r2140703485
More information about the core-libs-dev
mailing list