Silly equality checks should not be made

MSAL

Detects .equals() calls that compare incompatible types and will always return false. Replaces .equals(null) with == null and array .equals() with Arrays.equals(). Flags comparisons between unrelated types or between arrays and non-arrays.

org.openrewrite.staticanalysis.SillyEqualsCheck
mod run . --recipe=org.openrewrite.staticanalysis.SillyEqualsCheck

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.