JDK-8234223 : Release Note: Detailed Message in NullPointerExceptions
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 14
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Submitted: 2019-11-15
  • Updated: 2020-04-27
  • Resolved: 2019-12-05
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 14
14Resolved
Related Reports
Relates :  
Description
A new option is available to provide more helpful `NullPointerException` messages:

     -XX:+ShowCodeDetailsInExceptionMessages

If the option is set, on encountering a null pointer, the JVM analyzes the program to determine which reference was `null` and then provides the details as part of `NullPointerException.getMessage()`. In addition to the exception message, the method, filename, and line number are also returned. 

By default, this option is disabled.
Comments
Hi Coleen, I'm fine with this! Thanks, Goetz.
05-12-2019

[~dholmes] [~goetz] How does this sound? I used the text from the man page.
04-12-2019

[~goetz] Please provide a suitable title and text for the release note for JEP 358. Thanks.
15-11-2019