-XX:+ShowCodeDetailsInExceptionMessagesIts not the default because a bit more of your code will show in stack traces which may be a security concern.
Programming Tips - Java 14+: show which object is null in NullPointerExceptions
Date: 2020mar18
Language: Java
Q. Java 14+: show which object is null in NullPointerExceptions
A. Use this command-line option: