-
-
Notifications
You must be signed in to change notification settings - Fork 300
Closed
Description
Using ClassGraph with JDK >=24 (see https://openjdk.org/jeps/498) results in the following warning:
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::invokeCleaner has been called by nonapi.io.github.classgraph.utils.FileUtils (file:/home/zakkak/.m2/repository/io/github/classgraph/classgraph/4.8.179/classgraph-4.8.179.jar)
WARNING: Please consider reporting this to the maintainers of class nonapi.io.github.classgraph.utils.FileUtils
WARNING: sun.misc.Unsafe::invokeCleaner will be removed in a future release
The invocation happens in:
| cleanerCleanMethod = unsafeClass.getMethod("invokeCleaner", ByteBuffer.class); |
Reproducer
///usr/bin/env jbang "$0" "$@" ; exit $?
//DEPS io.github.classgraph:classgraph:4.8.179
import static java.lang.System.*;
import io.github.classgraph.ClassGraph;
import io.github.classgraph.ScanResult;
public class ClassgraphRepro {
public static void main(String... args) {
try (ScanResult scanResult = new ClassGraph().enableAllInfo().scan()) {
scanResult.getAllClasses().forEach(classInfo -> {
out.println(classInfo.getName());
});
}
}
}MirkoTeran, don-vip, ujibang, MI3Guy, VolkerVoss and 9 more
Metadata
Metadata
Assignees
Labels
No labels