Skip to content

JVM 25 warning - remove usage of sun.misc.Unsafe #9681

@der-eismann

Description

@der-eismann

Tracer Version(s)

1.53.0

Java Version(s)

25.0.0

JVM Vendor

Amazon Corretto

Bug Report

We are starting to use Java 25 with a bunch of projects and saw this warning block at the top of the output:

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by net.bytebuddy.dynamic.loading.ClassInjector$UsingUnsafe$Dispatcher$CreationAction (file:/usr/local/datadog-agent.jar)
WARNING: Please consider reporting this to the maintainers of class net.bytebuddy.dynamic.loading.ClassInjector$UsingUnsafe$Dispatcher$CreationAction
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release

I think this is similar to open-telemetry/opentelemetry-java-instrumentation#13375, would be nice if we could get rid of this warning and make the agent future proof. Maybe this is even coming from OpenTelemetry directly, feel free to close this issue then.

Expected Behavior

No warning during startup

Reproduction Code

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugBug report and fix

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions