Annotate Object#equals parameter with @Nullable

Closes gh-23093
This commit is contained in:
Sebastien Deleuze
2019-06-06 14:18:12 +02:00
parent 33becd8258
commit 098ac0bbb8
158 changed files with 222 additions and 176 deletions

View File

@@ -331,7 +331,7 @@ public class ContextConfigurationAttributes {
* {@link #getContextLoaderClass() ContextLoader class}.
*/
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}

View File

@@ -20,6 +20,7 @@ import java.util.function.Consumer;
import org.hamcrest.Matcher;
import org.springframework.lang.Nullable;
import org.springframework.test.util.JsonPathExpectationsHelper;
/**
@@ -178,7 +179,7 @@ public class JsonPathAssertions {
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
throw new AssertionError("Object#equals is disabled " +
"to avoid being used in error instead of JsonPathAssertions#isEqualTo(String).");
}