JEP proposed to target JDK 24: 498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe
Mark Reinhold
mark.reinhold at oracle.com
Mon Nov 18 14:06:50 UTC 2024
The following JEP is proposed to target JDK 24:
498: Warn upon Use of Memory-Access Methods in sun.misc.Unsafe
https://openjdk.org/jeps/498
Summary: Issue a warning at run time on the first occasion that any
memory-access method in sun.misc.Unsafe is invoked. All of these
unsupported methods were terminally deprecated in JDK 23. They have
been superseded by standard APIs, namely the VarHandle API (JEP 193,
JDK 9) and the Foreign Function & Memory API (JEP 454, JDK 22). We
strongly encourage library developers to migrate from sun.misc.Unsafe
to supported replacements, so that applications can migrate smoothly to
modern JDK releases.
Feedback on this proposal from JDK Project Committers and Reviewers [1]
is more than welcome, as are reasoned objections. If no such objections
are raised by 20:00 UTC on Monday, 25 November, or if they’re raised
and then satisfactorily answered, then per the JEP 2.0 process proposal
[2] I’ll target this JEP to JDK 24.
- Mark
[1] https://openjdk.org/census#jdk
[2] https://cr.openjdk.java.net/~mr/jep/jep-2.0-02.html
More information about the jdk-dev
mailing list