Add Nullable annotation to parameter of overridden equals method.

Closes #1374
Original pull request #1375
This commit is contained in:
Christoph Strobl
2022-11-08 14:13:47 +01:00
committed by Jens Schauder
parent ae1bb6a448
commit 5fbc68ef87
17 changed files with 29 additions and 20 deletions

View File

@@ -382,7 +382,7 @@ abstract class NamedParameterUtils {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o)
return true;
if (!(o instanceof ParameterHolder))

View File

@@ -24,6 +24,7 @@ import java.util.Set;
import java.util.function.BiConsumer;
import org.springframework.data.relational.core.sql.SqlIdentifier;
import org.springframework.lang.Nullable;
import org.springframework.r2dbc.core.Parameter;
import org.springframework.util.Assert;
@@ -195,7 +196,7 @@ public class OutboundRow implements Map<SqlIdentifier, Parameter>, Cloneable {
}
@Override
public boolean equals(final Object o) {
public boolean equals(@Nullable final Object o) {
if (this == o) {
return true;

View File

@@ -142,7 +142,7 @@ public abstract class AbstractR2dbcRepositoryWithMixedCaseNamesIntegrationTests
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o)
return true;
if (o == null || getClass() != o.getClass())