Silence warning with latest Java LTS (25) in maven 3.9.x#11729
Open
mpetricek-corp wants to merge 1 commit intoapache:maven-3.9.xfrom
Open
Silence warning with latest Java LTS (25) in maven 3.9.x#11729mpetricek-corp wants to merge 1 commit intoapache:maven-3.9.xfrom
mpetricek-corp wants to merge 1 commit intoapache:maven-3.9.xfrom
Conversation
…utputs a warning: 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:/usr/share/maven/lib/guava.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 Properly fixing this in 3.9.x branch would mean upgrading Guava to newer version, which I understood is impossible due to dependency version collisions/limitations This fix silences the warning
Member
|
how can I reproduce such warning ... |
Member
|
Isn't this 26 and not 25? |
Member
|
even with 26 I can not see it |
Contributor
|
From my expierence this comes from dependencies. For example when building maven core project with Maven 3.9.12 and Java 25 some tests throw this |
Member
Author
|
I observed it on debian, with system openJDK 25 installed. Not sure if different instantiation of JDK 25 could silence that warning by default. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
When used with latest Java LTS (i.e. 25 at the moment), maven 3.9.x outputs a warning:
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:/usr/share/maven/lib/guava.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
Properly fixing this in 3.9.x branch would mean upgrading Guava to newer version, which I understood is impossible due to dependency version collisions/limitations.
This fix silences the warning, in similar manner to MNG-8248