LuckPerms

LuckPerms

1M Downloads

JDK 24 - Deprecated method with "Caffeine"

Closed this issue · 2 comments

commented

Description

Hello,

I am using the latest JDK 24 (OpenJDK 24.0.1+9) and my proxy console warns me about a deprecated method (see image below).

Console:
Image

[29.05 20:24:45.734] WARN : [Proxy-1/WARN]: WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
[29.05 20:24:45.734] WARN : [Proxy-1/WARN]: WARNING: sun.misc.Unsafe::objectFieldOffset has been called by me.lucko.luckperms.lib.caffeine.cache.UnsafeAccess (file:/F:/minecraft/CloudNet%20v4/local/services/Proxy-1/plugins/luckperms/libs/caffeine-2.9.0-remapped.jar)
[29.05 20:24:45.735] WARN : [Proxy-1/WARN]: WARNING: Please consider reporting this to the maintainers of class me.lucko.luckperms.lib.caffeine.cache.UnsafeAccess
[29.05 20:24:45.735] WARN : [Proxy-1/WARN]: WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release

Proposed Behaviour

No warnings.

Extra Details

No response

commented

As this project requires Java 21+, please upgrade Caffeine to 3.x (v3.2.0 is the latest) where the minimum of Java 11 is required (2.x uses Java 8). That replaces Unsafe (Java 8) with VarHandles (Java 9) and resolves this deprecation warning.

commented