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