-
-
Notifications
You must be signed in to change notification settings - Fork 820
sun.misc.Unsafe deprecations in Java 24 #1803
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This means that Byte Buddy is likely used in a way that uses Unsafe. Typically for loading classes. This can likely be substituted by using method handles, but this is responsibility of the user. I'd suggest investigating the used ClassLoadingStrategy. |
Oh interesting, so it's being logged as coming from Byte Buddy, but not it isn't actually? |
It's used by |
Some of ByteBuddy's default configurations implicitly use new AgentBuilder.Default() ->
new InitializationStrategy.SelfInjection.Split() ->
new NexusAccess() ->
NexusAccess.<clinit> ->
private static final Dispatcher DISPATCHER = doPrivileged(Dispatcher.CreationAction.INSTANCE) ->
new ClassInjector.UsingReflection() When users use Even if the user tries to express intent to avoid those APIs (e.g., via This leaves users with no choice but to dig into the internals and potentially extend After reviewing the comments before, it seems most of the warnings point to the use of However, I think this behavior could be improved—perhaps ByteBuddy should attempt To go a step further: if ByteBuddy detects the presence of an Finally, even with the latest Java versions, I personally think it's a bit unfortunate to completely abandon |
You can set |
I started getting a lot of deprecation warnings after updating to Java 24.
The text was updated successfully, but these errors were encountered: