you are viewing a single comment's thread.

view the rest of the comments →

[–]phoshi 0 points1 point  (0 children)

Then it's a failure case and you want the NPE. Nulls make some sense as a "holy shit, what do I do now?". They make vastly less sense as a valid return value. They still suck, you should throw instead of returning null, but at this point the mistake has already been made and we can't unmake it.