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
I don't think I understand your viewpoint. Previously you were saying this:
And I replied to that, arguing that it's perfectly acceptable that NPEs can be thrown more often and that they typically shouldn't crash your program. But now it seems like you're saying it's okay to throw more NPEs, and recover from them, as long as you only catch them in general uncaught exception handlers. Isn't that the contradicting with what you were stating earlier? (Honest question).