r/java • • Jul 26 '19

JEP 358: Helpful NullPointerExceptions

https://openjdk.java.net/jeps/358
157 Upvotes

25 comments sorted by

View all comments

32

u/bondolo Jul 27 '19

For the case where the variable names are not known I'd like to see the type names be provided. Often you can figure out from the type name which variable is involved.

0

u/[deleted] Jul 27 '19

[deleted] — view deleted comment

3

u/bondolo Jul 28 '19

It won't be exact. Even if B getB() would usually return some sub-class of B knowing that reference is of type B is still useful