null
that are followed by a call to equals()
with a constant argument.
Example:
if (s != null && s.equals("literal")) {}
After the quick-fix is applied:
if ("literal".equals(s)) {}
Use the inspection settings to report equals()
calls with a non-constant argument
when the argument to equals()
is proven not to be null
.