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

@@ -208,7 +208,7 @@ public final class Identifier {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o)
return true;
@@ -272,7 +272,7 @@ public final class Identifier {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) return true;
if (o == null || getClass() != o.getClass()) return false;

View File

@@ -17,6 +17,8 @@ package org.springframework.data.jdbc.core.convert;
import java.util.Objects;
import org.springframework.lang.Nullable;
/**
* The subject of an insert, described by the entity instance and its {@link Identifier}, where identifier contains
* information about data that needs to be considered for the insert but which is not part of the entity. Namely
@@ -50,7 +52,7 @@ public final class InsertSubject<T> {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o)
return true;

View File

@@ -1001,7 +1001,7 @@ class SqlGenerator {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o) {
return true;

View File

@@ -65,7 +65,7 @@ public interface AggregateReference<T, ID> {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o)
return true;

View File

@@ -55,7 +55,7 @@ public class JdbcValue {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o)
return true;

View File

@@ -352,7 +352,7 @@ class JdbcQueryCreator extends RelationalQueryCreator<ParametrizedQuery> {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (this == o)
return true;