Skip to content
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

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called #7565

Closed
2 tasks done
khmarbaise opened this issue Dec 20, 2024 · 1 comment
Closed
2 tasks done
Labels
type=defect Bug, not working as expected

Comments

@khmarbaise
Copy link

Guava Version

guava-33.3.1-jre.jar

Description

While using a EA build of JDK 24 (24.ea.28) the following WARNING is emitted:

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper (file:/Users/khm/tools/maven/lib/guava-33.3.1-jre.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release

Also check the newer version guava-33.4.0-jre.jar

$> mvn verify
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper (file:/Users/khm/tools/maven/lib/guava-33.4.0-jre.jar)
WARNING: Please consider reporting this to the maintainers of class com.google.common.util.concurrent.AbstractFuture$UnsafeAtomicHelper
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release

Example

Using Apache Maven 4.0.0-rc-2 will emit this warning based on the usage of guava. Any project which will be built with Apache Maven 4.0.0-rc-2 will emit this WARNING...

Expected Behavior

The WARNINGs should not emitted anymore based on the deprecation of the usage.

Actual Behavior

As described in description.

Packages

No response

Platforms

No response

Checklist

  • I agree to follow the code of conduct.

  • I can reproduce the bug with the latest version of Guava available.

@khmarbaise khmarbaise added the type=defect Bug, not working as expected label Dec 20, 2024
@cpovirk
Copy link
Member

cpovirk commented Dec 20, 2024

Thanks. We're tracking this in #6806, which I'll give a better title to.

For AbstractFuture specifically, the fix is in #7555, which I have ready to submit in the new year.

@cpovirk cpovirk closed this as completed Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type=defect Bug, not working as expected
Projects
None yet
Development

No branches or pull requests

2 participants