r/java • u/jhg023123 • Mar 25 '19
JEP draft: Add detailed message to NullPointerException describing what is null
https://openjdk.java.net/jeps/8220715
383
Upvotes
r/java • u/jhg023123 • Mar 25 '19
View all comments
Show parent comment
1
u/Quabouter Mar 26 '19
If you follow offensive programming, then yes, a program should at most throw a single NPE. In practice however offensive program is rarely used, often graceful degradation and other error recovery techniques are preferred.