On Mon, 4 Dec 2023 14:49:39 GMT, Jorn Vernee <jver...@openjdk.org> wrote:
>> Chen Liang has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains two commits: >> >> - Merge branch 'master' of https://github.com/openjdk/jdk into >> cleanup/vh-template-share >> - 8316641: VarHandle template classes can share code in the base class > > src/java.base/share/classes/java/lang/invoke/X-VarHandleByteArrayView.java.template > line 594: > >> 592: @ForceInline >> 593: static int indexRO(ByteBuffer bb, int index) { >> 594: if (bb.isReadOnly()) > > I have to think that there was a reason for using unsafe access in the > current code. So, I'm not sure if it's safe to switch this to a direct > method/field reference. @PaulSandoz Do you remember the history here? ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15854#discussion_r1414026084