Skip to content

[MNG-8248] WARNING: A restricted method in java.lang.System has been called #10391

@jira-importer

Description

@jira-importer

Karl Heinz Marbaise opened MNG-8248 and commented

Building a project with JDK 24.ea.13 produces the following WARNING:

$> mvn clean verify
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by org.jline.nativ.JLineNativeLoader in an unnamed module (file:/Users/khm/tools/maven/lib/jline-3.26.3.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

also a simple:

mvn --version

wil trigger:

$> mvn --version
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::load has been called by org.fusesource.jansi.internal.JansiLoader in an unnamed module (file:/Users/khm/tools/maven/lib/jansi-2.4.1.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled

Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /Users/khm/tools/maven
Java version: 24-ea, vendor: Oracle Corporation, runtime: /Users/khm/.sdkman/candidates/java/24.ea.13-open
Default locale: en_DE, platform encoding: UTF-8
OS name: "mac os x", version: "14.6.1", arch: "aarch64", family: "mac"

Also opened an issue on JLine3 Project: jline/jline3#1067


Affects: 3.8.1, 3.8.2, 3.8.3, 3.8.4, 3.8.5, 3.8.6, 3.8.7, 3.8.8, 3.9.0, 3.9.1, 3.9.2, 3.9.3, 3.9.4, 3.9.5, 3.9.6, 3.9.7, 3.9.8, 3.9.9, 4.0.0-beta-3, 4.0.0-beta-4

Issue Links:

  • MNG-8260 Fix warning on latest JDK 24.ea
    ("is fixed by")
  • MNG-8721 Prints Warnings about JANSI when running on JDK 24
    ("is duplicated by")
  • MNG-8169 MINGW support requires --add-opens java.base/java.lang=ALL-UNNAMED

Remote Links:

0 votes, 7 watchers

Metadata

Metadata

Labels

bugSomething isn't workingpriority:minorMinor loss of function, or other problem where easy workaround is present

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions