Consistently declare Object::equals argument as @Nullable

This commit is contained in:
Sam Brannen
2023-03-13 21:43:21 +01:00
parent a6dab10309
commit 00be19c647
74 changed files with 149 additions and 103 deletions

View File

@@ -2251,7 +2251,7 @@ class SpelReproTests extends AbstractExpressionTests {
}
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other || (other instanceof TestClass2 &&
this.string.equals(((TestClass2) other).string)));
}

View File

@@ -16,6 +16,8 @@
package org.springframework.expression.spel.testresources;
import org.springframework.lang.Nullable;
///CLOVER:OFF
public class PlaceOfBirth {
@@ -51,7 +53,7 @@ public class PlaceOfBirth {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (!(o instanceof PlaceOfBirth otherPOB)) {
return false;
}