Skip to content

New restriction warnings on Java 24 #8696

@headius

Description

@headius

There are two new warnings for a basic -e 1 on Java 24:

  1. Restriction on native library loading that must be enabled in the future:
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.kenai.jffi.internal.StubLoader in module org.jruby.dist (file:/Users/headius/work/jruby/lib/jruby.jar)
WARNING: Use --enable-native-access=org.jruby.dist to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::putLong has been called by com.kenai.jffi.UnsafeMemoryIO$UnsafeMemoryIO64 (file:/Users/headius/work/jruby/lib/jruby.jar)
WARNING: Please consider reporting this to the maintainers of class com.kenai.jffi.UnsafeMemoryIO$UnsafeMemoryIO64
WARNING: sun.misc.Unsafe::putLong will be removed in a future release
  1. Usage of Unsafe is now warning more noisily:
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by com.kenai.jffi.internal.StubLoader in module org.jruby.dist (file:/Users/headius/work/jruby/lib/jruby.jar)
WARNING: Use --enable-native-access=org.jruby.dist to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

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

These are both in JFFI but I file it here because it is very visible for JRuby users.

See jnr/jffi#165 for part of this (Unsafe stuff).

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