Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8345422

Fix JNI Checker "in native method" warnings in the debug agent and debugger tests

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 24
    • 24
    • core-svc
    • None
    • b27

      The test log for JDK-8344804 shows a JNI Checker warning:

       WARNING in native method: JNI FindClass received a bad class descriptor "Ljava/lang/Module;". A correct class descriptor has no leading "L" or trailing ";". Incorrect descriptors will not be accepted in future releases.

      The test then times out. Fixing this one JNI Checker warning does not fix the test failure, because there are other warnings that follow. When I addressed all the "in native method" warnings in all the debugger related tests, then the test started to pass.

      This CR is only for addressing the "in native method" warnings. There are still others present. The most common seems to be the following, which this CR is not addressing:

       WARNING: A restricted method in java.lang.System has been called
       WARNING: java.lang.System::loadLibrary has been called by nsk.share.jdi.MonitorEnterExecutor in an unnamed module (file:/scratch/cplummer/ws/jdk/jdk.clean2/build/linux-x64-debug/test-support/jtreg_open_test_hotspot_jtreg_vmTestbase_nsk_jdi/classes/3/vmTestbase/)
       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

            cjplummer Chris Plummer
            cjplummer Chris Plummer
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: