VarHandle implementations have many static fields and methods that can be pulled to the common superclass to avoid repeated initialization and code duplication.
In addition, the Unsafe-based Buffer field access are replaced by usage of public methods or JavaNioAccess. ------------- Commit messages: - Clean up VarHandle template classes Changes: https://git.openjdk.org/jdk/pull/15854/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=15854&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8316641 Stats: 136 lines in 5 files changed: 31 ins; 50 del; 55 mod Patch: https://git.openjdk.org/jdk/pull/15854.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/15854/head:pull/15854 PR: https://git.openjdk.org/jdk/pull/15854