Consistently declare Object::equals argument as @Nullable
This commit is contained in:
@@ -26,6 +26,7 @@ import java.util.function.Supplier;
|
||||
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.MutablePropertySources;
|
||||
import org.springframework.lang.Nullable;
|
||||
import org.springframework.test.context.ContextCustomizer;
|
||||
import org.springframework.test.context.DynamicPropertyRegistry;
|
||||
import org.springframework.test.context.DynamicPropertySource;
|
||||
@@ -96,7 +97,7 @@ class DynamicPropertiesContextCustomizer implements ContextCustomizer {
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
public boolean equals(@Nullable Object obj) {
|
||||
if (this == obj) {
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -190,7 +190,7 @@ public class XpathAssertions {
|
||||
|
||||
|
||||
@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 XPathAssertions#isEqualTo(String).");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user