Skip to content

Fix deprecated Unsafe access (Java 24+) #36

@Karolina-Bogacka

Description

@Karolina-Bogacka

Warning text:

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$ (file:/home/karokaro/IdeaProjects/cli/target/graalvm-native-image/jelly-cli)
WARNING: Please consider reporting this to the maintainers of class scala.runtime.LazyVals$
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release

native-image --version

native-image 24 2025-03-18
GraalVM Runtime Environment Oracle GraalVM 24+36.1 (build 24+36-jvmci-b01)
Substrate VM Oracle GraalVM 24+36.1 (build 24+36, serial gc, compressed references)

Context:
The warning does not appear in test output or global artefacts, just in the above local deployment.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions