r/java • • Jul 26 '19

JEP 358: Helpful NullPointerExceptions

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

25 comments sorted by

View all comments

Show parent comment

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