On Tue, 10 Jun 2025 17:01:24 GMT, Per Minborg <pminb...@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 1311: > 1309: * bytes of this segment are not accessed. For > multi-octet charset, > 1310: * {@code '\0'} terminator characters are only detected on > 1311: * multi-octet-aligned boundaries. Typo: Suggestion: * @implNote If the {@linkplain #byteSize()} of this segment is not evenly dividable * by the number of octets used by the provided {@code charset}, the remaining * bytes of this segment are not accessed. For multi-octet charset, * {@code '\0'} terminator characters are only detected on * multi-octet-aligned boundaries. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/25715#discussion_r2140698024