JDK-8030875 : Macros for checking and returning on exceptions
  • Type: Enhancement
  • Component: core-libs
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-12-20
  • Updated: 2017-09-05
  • Resolved: 2014-01-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9 Other
8u20Fixed 9 b02Fixed openjdk7uFixed
The checking for exceptions should be consistent within native code.
The net and pack200 native code uses CHECK_NULL(x) and CHECK_NULL(x, y).

Similar macros for CHECK_EXCEPTION(env), CHECK_EXCEPTION_NULL(env), and CHECK_EXCEPTION_RETURN(env, y) using (*env)->ExceptionCheck should be added.

The macros should be promoted to the common/jni_util.h and applied consistently.