Remove non-null annotations from equals parameters

Proprietary

Removes a non-null annotation, such as @Nonnull, @NonNull or @NotNull, from the parameter of an equals(Object) override. Object#equals must return false for null, so the annotation contradicts the contract, and Lombok's @NonNull even makes equals(null) throw. Only an annotation written on the parameter is removed, not a class- or package-level default such as @NullMarked, and javax.annotation.Nonnull only without when or with when = ALWAYS. Test sources are not changed.

io.moderne.staticanalysis.RemoveNonNullFromEqualsParameter
mod run . --recipe=io.moderne.staticanalysis.RemoveNonNullFromEqualsParameter

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