JDK-4834738 : RFE: NullPointerException: Better info
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.1,1.4.2,5.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS:
    linux,windows_nt,windows_2000,windows_xp linux,windows_nt,windows_2000,windows_xp
  • CPU: x86
  • Submitted: 2003-03-19
  • Updated: 2014-02-12
  • Resolved: 2014-02-12
Related Reports
Duplicate :  
Duplicate :  
Duplicate :  
Description
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) 
======================================================================

Comments
We'll not implement this. Closing as WNF
12-02-2014

EVALUATION Will look into this in tiger.. ###@###.### 2003-03-20
20-03-2003