Skip to content

Replace deprecated Unsafe API #165

@Horcrux7

Description

@Horcrux7

I get the follow on the console with Java 23:

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::getLong has been called by com.kenai.jffi.UnsafeMemoryIO$UnsafeMemoryIO64 (file:.../jffi.jar)
WARNING: Please consider reporting this to the maintainers of class com.kenai.jffi.UnsafeMemoryIO$UnsafeMemoryIO64
WARNING: sun.misc.Unsafe::getLong will be removed in a future release

If I look into the source of Unsafe you should use the class VarHandle which exists since Java 9.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions