On Mon, 10 Jun 2024 14:59:42 GMT, Per Minborg <pminb...@openjdk.org> wrote:

>> This PR proposes to retain the read-only state when any of the 
>> `MemorySegment::reinterpret` methods is called.
>> 
>> Previously, the read-only state was lost and the returned `MemorySegment` 
>> was always writable regardless of the original segment's read-only state.
>
> Per Minborg has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Rework docs

Marked as reviewed by mcimadamore (Reviewer).

src/java.base/share/classes/java/lang/foreign/MemorySegment.java line 710:

> 708:      * but with the provided size.
> 709:      * <p>
> 710:      * If, and only if, this segment is {@linkplain 
> MemorySegment#isReadOnly() read-only},

Correct, but the `, and only if, ` seems a tad too pedantic? I'll leave that to 
your consideration, not a strong feeling.

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

PR Review: https://git.openjdk.org/jdk/pull/19629#pullrequestreview-2108075180
PR Review Comment: https://git.openjdk.org/jdk/pull/19629#discussion_r1633412181

Reply via email to