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

Cleanup the usages of CHECK_EXCEPTION_NULL_FAIL macro in java launcher

    XMLWordPrintable

Details

    • Task
    • Resolution: Fixed
    • P4
    • 24
    • 22
    • tools
    • b03

    Description

      The java launcher currently uses a CHECK_EXCEPTION_NULL_FAIL which gets passed a value. This macro first checks if a preceding operation has thrown any exception and if yes then it exits the callsite with a "return 0". Else, it then checks if the passed value is NULL and if yes, then again it exits the callsite with a "return 0".

      This macro has been used to check if a JNI specified function completed successfully. However, each of the callsites where this macro is used invokes a JNI specified function which is specified to return NULL if the operation isn't successful. As such, a mere NULL check should be enough at such call sites instead of this macro.

      This issue was brought up during a recent PR review and it was suggested that a new issue be opened to address this https://github.com/openjdk/jdk/pull/18786#issuecomment-2147452633

      Attachments

        Issue Links

          Activity

            People

              jpai Jaikiran Pai
              jpai Jaikiran Pai
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: