Add Nullable annotation to parameter of overridden equals method.

Closes: #2196
Original pull request: #2197
This commit is contained in:
Christoph Strobl
2022-11-08 14:40:19 +01:00
committed by Mark Paluch
parent a9bfcfeb57
commit 6f68fe814f
10 changed files with 21 additions and 14 deletions

View File

@@ -173,7 +173,7 @@ class DelegatingHandlerMapping implements MatchableHandlerMapping, Iterable<Hand
}
@Override
public boolean equals(final java.lang.Object o) {
public boolean equals(@Nullable final java.lang.Object o) {
if (o == this) {
return true;

View File

@@ -93,7 +93,7 @@ class SpelPath {
}
@Override
public boolean equals(Object obj) {
public boolean equals(@Nullable Object obj) {
if (this == obj) {
return true;
@@ -173,7 +173,7 @@ class SpelPath {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
@@ -529,7 +529,7 @@ class SpelPath {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
@@ -691,7 +691,7 @@ class SpelPath {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;
@@ -721,7 +721,7 @@ class SpelPath {
}
@Override
public boolean equals(final java.lang.Object o) {
public boolean equals(@Nullable final java.lang.Object o) {
if (o == this) {
return true;

View File

@@ -18,6 +18,7 @@ package org.springframework.data.rest.webmvc.support;
import java.util.Objects;
import org.springframework.data.domain.Pageable;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**
@@ -67,7 +68,7 @@ public final class DefaultedPageable {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;

View File

@@ -25,6 +25,7 @@ import org.springframework.data.mapping.PersistentProperty;
import org.springframework.data.mapping.PersistentPropertyAccessor;
import org.springframework.data.rest.webmvc.PersistentEntityResource;
import org.springframework.http.HttpHeaders;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
/**
@@ -170,7 +171,7 @@ public final class ETag {
}
@Override
public boolean equals(Object o) {
public boolean equals(@Nullable Object o) {
if (o == this) {
return true;

View File

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