on JDK24 gives warning of usage of deprecated methods
> Task :test
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:/C:/Users/nagkumar/.gradle/caches/modules-2/files-2.1/net.bytebuddy/byte-buddy/1.17.6/8c70cbc6950b2ae5291a98d5003e06406d633803/byte-buddy-1.17.6.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
This is the error when using jdk 24, works fine with jdk 17..
using these versions..
implementation("net.bytebuddy:byte-buddy:1.17.6")
implementation("net.bytebuddy:byte-buddy-agent:1.17.6")
This will no longer happen, as Byte Buddy already guards against the class not being available. You can however run with -Dnet.bytebuddy.safe=true. Are you using unsafe explicitly in your program somehow?
when I give this jvm arg
-Dnet.bytebuddy.safe=true
those warnings are gone..
However not sure how to get back this warning as post true I made the value to false, no warning, and removed this -D property fully, then also no warning..
when I give this byte rewrite is not happening.. can you check the code changes needed
Are you using unsafe explicitly in your program somehow?
No, but maybe indirectly ,as my two files to wrap method calls are in
https://github.com/nagkumar/java/tree/416e4b60dd4accdadf4aa7bc9113842b43b414d3/tutorials/testing/junit5/AssertsCounter/ACAgent/src/com/shivohamai/testing/tools/junit5/assertscounter/agent