-
Notifications
You must be signed in to change notification settings - Fork 111
Description
Description
When using JOML 1.10.8 on a modern JDK (e.g. Java 24/25), a "terminally deprecated" warning is emitted due to the use of sun.misc.Unsafe::objectFieldOffset.
With the ongoing work on JEP 471, several memory access methods in sun.misc.Unsafe are deprecated for removal. This may cause compatibility issues or breakage in future Java releases if JOML does not migrate to supported alternatives such as VarHandle or MemorySegment.
Reference: https://openjdk.org/jeps/471
Steps to Reproduce
- Use
org.joml:joml:1.10.8 - Run on a JDK that emits warnings for deprecated
Unsafeusage (e.g. Java 25 or recent EA builds). - Execute code that triggers initialization of
org.joml.MemUtil.
Log Output
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by org.joml.MemUtil$MemUtilUnsafe (file:/data/libraries/org/joml/joml/1.10.8/joml-1.10.8.jar)
WARNING: Please consider reporting this to the maintainers of class org.joml.MemUtil$MemUtilUnsafe
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release