Name: rmT116609 Date: 03/19/2003
A DESCRIPTION OF THE REQUEST :
Include the class name and variable name in any NullPointerException message.
JUSTIFICATION :
It would make debugging easier.
EXPECTED VERSUS ACTUAL BEHAVIOR :
The message of the NullPointerException should include the class name and variable name whenever possible. It is understood that it might not always be possible because of changes made by a JIT.
NullPointerException doesn't include a message.
CUSTOMER SUBMITTED WORKAROUND :
Catch and rethrow the NullPointerException around each possible pointer dereference.
(Review ID: 182849)
======================================================================
A DESCRIPTION OF THE REQUEST :
Include the class name and variable name in any NullPointerException message.
JUSTIFICATION :
It would make debugging easier.
EXPECTED VERSUS ACTUAL BEHAVIOR :
The message of the NullPointerException should include the class name and variable name whenever possible. It is understood that it might not always be possible because of changes made by a JIT.
NullPointerException doesn't include a message.
CUSTOMER SUBMITTED WORKAROUND :
Catch and rethrow the NullPointerException around each possible pointer dereference.
(Review ID: 182849)
======================================================================
- duplicates
-
JDK-4966568 java.lang.NullPointerException: say which variable when multiple in the line
-
- Closed
-
-
JDK-6194143 Null Pointer Exception getMessage() is too terse.
-
- Closed
-
-
JDK-6717558 NullPointerException's from JVM lack any detail message
-
- Closed
-