[BUG] JDK 25 - sun.misc.Unsafe has been called by lombok.permit.Permit
Author: mmoser18Created Jun 9, 2026Updated Sep 30, 2026
I am getting the same bug (or rather: warning) that was described here https://github.com/projectlombok/lombok/issues/3852 but this time using JDK 25.
(the first few lines stem from echo statements I had added to the maven cmd file).
building using C:\Program Files\Java\jdk-25.0:
run maven build:
JAVA_HOME: 'C:\Program Files\Java\jdk-25.0'
JAVACMD: 'C:\Program Files\Java\jdk-25.0\bin\java.exe'
[INFO] Scanning for projects...
... some non-important stuff removed for brevity ...
[INFO] --- compiler:3.14.1:compile (default-compile) @ kis-monitoring ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 103 source files with javac [debug parameters release 25] to target\classes
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by lombok.permit.Permit
WARNING: Please consider reporting this to the maintainers of class lombok.permit.Permit
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future releaseThe mentioned thread was not exactly conclusive re. what to do in order to avoid or fix this. Any ideas or comments?
Note: this is building/compiling on the windows command line (i.e. using mvn clean verify -Pproduction), i.e. no IDE (eclipse or other) is involved here!
U:\Documents\eclipse\workspace\KISM> mvn --version
JAVA_HOME: 'C:\Program Files\Eclipse Adoptium\jdk-25.0.3.9-hotspot\'
JAVACMD: 'C:\Program Files\Eclipse Adoptium\jdk-25.0.3.9-hotspot\\bin\java.exe'
Apache Maven 3.9.14 (996c630dbc656c76214ce58821dcc58be960875b)
Maven home: C:\Program Files\Apache\apache-maven
Java version: 25.0.3, vendor: Eclipse Adoptium, runtime: C:\Program Files\Eclipse Adoptium\jdk-25.0.3.9-hotspot
Default locale: en_US, platform encoding: UTF-8
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"Just in case: The above "C:\Program Files\Java\jdk-25.0" (from the first snippet) is a symlink to "C:\Program Files\Eclipse Adoptium\jdk-25.0.3.9-hotspot", so the two JDKs are the same.
Source: projectlombok/lombok