Skip to content

Commit 52fbdad

Browse files
christophstroblmp911de
authored andcommitted
Add Nullable annotation to parameter of overridden equals method.
Closes: #1325 Original pull request: #1326
1 parent c4fd1f2 commit 52fbdad

27 files changed

+42
-30
lines changed

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/config/KeyspaceActions.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
import java.util.List;
2020

2121
import org.springframework.data.cassandra.core.cql.keyspace.KeyspaceActionSpecification;
22+
import org.springframework.lang.Nullable;
2223
import org.springframework.util.ObjectUtils;
2324

2425
/**
@@ -48,7 +49,7 @@ public List<KeyspaceActionSpecification> getActions() {
4849
* @see java.lang.Object#equals(java.lang.Object)
4950
*/
5051
@Override
51-
public boolean equals(Object o) {
52+
public boolean equals(@Nullable Object o) {
5253

5354
if (this == o) {
5455
return true;

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/DeleteOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ public Filter getIfCondition() {
109109
* @see java.lang.Object#equals(java.lang.Object)
110110
*/
111111
@Override
112-
public boolean equals(Object o) {
112+
public boolean equals(@Nullable Object o) {
113113

114114
if (this == o) {
115115
return true;

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/InsertOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ public boolean isInsertNulls() {
107107
* @see java.lang.Object#equals(java.lang.Object)
108108
*/
109109
@Override
110-
public boolean equals(Object o) {
110+
public boolean equals(@Nullable Object o) {
111111

112112
if (this == o) {
113113
return true;

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/UpdateOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ public boolean isIfExists() {
111111
* @see java.lang.Object#equals(java.lang.Object)
112112
*/
113113
@Override
114-
public boolean equals(Object o) {
114+
public boolean equals(@Nullable Object o) {
115115

116116
if (this == o) {
117117
return true;

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/convert/SchemaFactory.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
import org.springframework.data.convert.CustomConversions;
3333
import org.springframework.data.mapping.MappingException;
3434
import org.springframework.data.mapping.context.MappingContext;
35+
import org.springframework.lang.Nullable;
3536
import org.springframework.util.Assert;
3637

3738
import com.datastax.oss.driver.api.core.CqlIdentifier;
@@ -402,7 +403,7 @@ public void attach(@edu.umd.cs.findbugs.annotations.NonNull AttachmentPoint atta
402403
}
403404

404405
@Override
405-
public boolean equals(Object o) {
406+
public boolean equals(@Nullable Object o) {
406407
if (this == o)
407408
return true;
408409
if (!(o instanceof com.datastax.oss.driver.api.core.type.UserDefinedType))

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/CqlIdentifier.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
import java.io.Serializable;
1919
import java.util.regex.Pattern;
2020

21+
import org.springframework.lang.Nullable;
2122
import org.springframework.util.Assert;
2223

2324
/**
@@ -237,7 +238,7 @@ public int compareTo(CqlIdentifier identifier) {
237238
* @see java.lang.Object#equals(java.lang.Object)
238239
*/
239240
@Override
240-
public boolean equals(Object o) {
241+
public boolean equals(@Nullable Object o) {
241242

242243
if (this == o)
243244
return true;

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/KeyspaceIdentifier.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717

1818
import java.util.regex.Pattern;
1919

20+
import org.springframework.lang.Nullable;
2021
import org.springframework.util.Assert;
2122

2223
import com.datastax.oss.driver.api.core.CqlIdentifier;
@@ -122,7 +123,7 @@ public int hashCode() {
122123
* equal to a {@link KeyspaceIdentifier}.
123124
*/
124125
@Override
125-
public boolean equals(Object that) {
126+
public boolean equals(@Nullable Object that) {
126127
if (this == that) {
127128
return true;
128129
}

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/QueryOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ protected Boolean getTracing() {
217217
* @see java.lang.Object#equals(java.lang.Object)
218218
*/
219219
@Override
220-
public boolean equals(Object o) {
220+
public boolean equals(@Nullable Object o) {
221221

222222
if (this == o) {
223223
return true;

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/WriteOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ public Long getTimestamp() {
112112
* @see java.lang.Object#equals(java.lang.Object)
113113
*/
114114
@Override
115-
public boolean equals(Object o) {
115+
public boolean equals(@Nullable Object o) {
116116

117117
if (this == o) {
118118
return true;

spring-data-cassandra/src/main/java/org/springframework/data/cassandra/core/cql/keyspace/CreateKeyspaceSpecification.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ public CreateKeyspaceSpecification with(String name, @Nullable Object value, boo
165165
* @see java.lang.Object#equals(java.lang.Object)
166166
*/
167167
@Override
168-
public boolean equals(Object o) {
168+
public boolean equals(@Nullable Object o) {
169169

170170
if (this == o) {
171171
return true;

0 commit comments

Comments
 (0)