On Wed, 23 Apr 2025 10:10:54 GMT, Viktor Klang <vkl...@openjdk.org> wrote:

> This Pull Request replaces the uses of Field + setAccessible to modify final 
> fields in java.util.concurrent with Unsafe.

src/java.base/share/classes/java/util/concurrent/ConcurrentSkipListSet.java 
line 534:

> 532:         U.putReference(
> 533:             this,
> 534:             U.objectFieldOffset(ConcurrentSkipListSet.class, "m"),

Would it make sense to compute the offset once and for all and put it in a 
`static final long` field?

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24821#discussion_r2055774428

Reply via email to