Description
Java 26 is completely dropping support for the sun.misc.Unsafe class. The version of Caffeine cache that the agent bundles utilizes this class internally, which means without any changes, the agent will cease to work when running under a Java 26 runtime. The agent is unable to upgrade to a version of Caffeine that doesn't utilize sun.misc.Unsafe, since the fixed version only supports Java 9+.
A few options, in no particular order:
- Replace Caffeine with another cache library
Multi-version agent jar (one for Java 8, one for Java 9+)
- Shadow both versions of Caffeine in the agent; have a multi-release jar with a CollectionsFactory that picks the proper underlying Caffeine impl at runtime
- Drop support for Java 8
- Two forks of the agent, one for Java 8, one for Java 9+
Relates to #2730
Removal of Unsafe
Description
Java 26 is completely dropping support for the sun.misc.Unsafe class. The version of Caffeine cache that the agent bundles utilizes this class internally, which means without any changes, the agent will cease to work when running under a Java 26 runtime. The agent is unable to upgrade to a version of Caffeine that doesn't utilize sun.misc.Unsafe, since the fixed version only supports Java 9+.
A few options, in no particular order:
Multi-version agent jar (one for Java 8, one for Java 9+)Relates to #2730
Removal of Unsafe