Covariant equals
MSALChecks that classes and records which define a covariant equals() method also override method equals(Object). Covariant equals() means a method that is similar to equals(Object), but with a covariant parameter type (any subtype of Object). Without a proper equals(Object) override, collections and other framework code that rely on the standard signature will silently use Object.equals, leading to incorrect behavior. Adds an equals(Object) that delegates to the covariant equals(), so overrides and callers of the covariant method keep compiling. Classes that do not also declare hashCode() are left unchanged.
org. openrewrite. staticanalysis. CovariantEqualsmod run . --recipe= org. openrewrite. staticanalysis. CovariantEqualsInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.