Annotate Object#equals parameter with @Nullable

Closes gh-23093
This commit is contained in:
Sebastien Deleuze
2019-06-06 14:18:12 +02:00
parent 33becd8258
commit 098ac0bbb8
158 changed files with 222 additions and 176 deletions

View File

@@ -16,6 +16,7 @@
package org.springframework.web.socket;
import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
@@ -72,7 +73,7 @@ public abstract class AbstractWebSocketMessage<T> implements WebSocketMessage<T>
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}

View File

@@ -200,7 +200,7 @@ public final class CloseStatus {
}
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}

View File

@@ -311,7 +311,7 @@ public class WebSocketHttpHeaders extends HttpHeaders {
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}

View File

@@ -229,7 +229,7 @@ public class DefaultSimpUserRegistry implements SimpUserRegistry, SmartApplicati
}
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other ||
(other instanceof SimpUser && getName().equals(((SimpUser) other).getName())));
}
@@ -285,7 +285,7 @@ public class DefaultSimpUserRegistry implements SimpUserRegistry, SmartApplicati
}
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
return (this == other ||
(other instanceof SimpSubscription && getId().equals(((SimpSubscription) other).getId())));
}
@@ -335,7 +335,7 @@ public class DefaultSimpUserRegistry implements SimpUserRegistry, SmartApplicati
}
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}

View File

@@ -121,7 +121,7 @@ public class SockJsFrame {
@Override
public boolean equals(Object other) {
public boolean equals(@Nullable Object other) {
if (this == other) {
return true;
}