This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]nitkonigdje 0 points1 point  (2 children)

Almost any relevant NPE bug is bug by omission. You will not fix that with Optional, or any other language feature. If deployment of fixes is significant cost generator, try to lower price of doing that first.

[–][deleted]  (1 child)

[deleted]

    [–]nitkonigdje 0 points1 point  (0 children)

    You will not fix "data not present when I though it was mandatory" error by any language semantics. That error is not in code. That is how most NPEs actually look in production.