On Mon, 4 Dec 2023 13:58:45 GMT, Alan Bateman <al...@openjdk.org> wrote:
>The backing array is not frozen so a read-only view doesn't address the second >part of the concern where the target keeps a reference. The users outside of OpenJDK would not have a reference to `byte[]`. Do you mean a reference to `ByteBuffer`? What if there was a `ByteBuffer#forbidReads()` method that would permanently forbid subsequent reads from the `ByteBuffer`? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16879#discussion_r1413921224