IPP: Intention for "safe" equality check

As recently discussed in a separate thread in the EAP forum, a naive object equality check using equals() is often a cause for NPEs. The IPP offers to replace the equals() with ==, but this is normally not quite what is meant.

Instead, the IPP should have an intention to replace a phrase like

with something like

which completely eliminates the danger of NPEs and should normally be what the user intended.


Please sign in to leave a comment.