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

WARNING: JNI call made without checking exceptions

XMLWordPrintable

    • b24
    • generic
    • generic

        After a JNI call returned, it should be checked whether there is a pending exception. Otherwise, at the moment of the next JNI call, you will receive a warning message.

        This rule is obviously not adhered to in src/jdk.jdwp.agent/share/native/libjdwp/util.c. To reproduce, simply issue the command
          bin/java -Xcheck:jni -agentlib:jdwp=transport=dt_socket,server=y,suspend=n -version
        and you will see the warning.

        The rule violation was found with the help of the test
          test/jdk/tools/launcher/TestXcheckJNIWarnings.java
        using SAP's commercial VM offering. For the OpenJDK variant to show the warning, you will need to specify the above -agentlib parameter.

              lucy Lutz Schmidt
              lucy Lutz Schmidt
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: