3 ms·
"Helpful NullPointerExceptions describing precisely which variable was null JDK 15" I wonder what number of collective hours would have been saved with this on
by tyingq 6y ago
"Helpful NullPointerExceptions describing precisely which variable was null
JDK 15"
I wonder what number of collective hours would have been saved with this one, had it come earlier.
- pvorb 6y agoOh yes. Did you ever have a statement where you chain more than two method calls and don't know which returns null? I tend to split calls like this on separate lines just to be able to tell which call returns null from the line number in the stack trace. obj.call1().call2().call3(); becomes obj.call1() .call2() .call3(); And if I now get an NPE at line three, I know that call2() returned null.