RFR: 8333884: MemorySegment::reinterpret removes read-only property

Per Minborg pminborg at openjdk.org
Mon Jun 10 13:24:35 UTC 2024


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.

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

Commit messages:
 - Make reinterpret retain read-only state

Changes: https://git.openjdk.org/jdk/pull/19629/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=19629&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8333884
  Stats: 37 lines in 4 files changed: 9 ins; 1 del; 27 mod
  Patch: https://git.openjdk.org/jdk/pull/19629.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/19629/head:pull/19629

PR: https://git.openjdk.org/jdk/pull/19629


More information about the core-libs-dev mailing list