Add missing @Override annotations

This commit is contained in:
Sam Brannen
2019-08-22 14:48:08 +02:00
parent 0b63db26b7
commit ad6231ad29
108 changed files with 321 additions and 0 deletions

View File

@@ -60,6 +60,7 @@ public abstract class AbstractWebSocketMessage<T> implements WebSocketMessage<T>
/**
* Return the message payload (never {@code null}).
*/
@Override
public T getPayload() {
return this.payload;
}
@@ -67,6 +68,7 @@ public abstract class AbstractWebSocketMessage<T> implements WebSocketMessage<T>
/**
* Whether this is the last part of a message sent as a series of partial messages.
*/
@Override
public boolean isLast() {
return this.last;
}

View File

@@ -139,6 +139,7 @@ public class StandardWebSocketSession extends AbstractWebSocketSession<Session>
return this.extensions;
}
@Override
public Principal getPrincipal() {
return this.user;
}

View File

@@ -209,6 +209,7 @@ public class WebSocketMessageBrokerStats {
return str.substring(str.indexOf("pool"), str.length() - 1);
}
@Override
public String toString() {
return "WebSocketSession[" + getWebSocketSessionStatsInfo() + "]" +
", stompSubProtocol[" + getStompSubProtocolStatsInfo() + "]" +

View File

@@ -169,6 +169,7 @@ public class DefaultSimpUserRegistry implements SimpUserRegistry, SmartApplicati
return this.users.size();
}
@Override
public Set<SimpSubscription> findSubscriptions(SimpSubscriptionMatcher matcher) {
Set<SimpSubscription> result = new HashSet<>();
for (LocalSimpSession session : this.sessions.values()) {

View File

@@ -221,6 +221,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
/**
* Handle incoming WebSocket messages from clients.
*/
@Override
public void handleMessageFromClient(WebSocketSession session,
WebSocketMessage<?> webSocketMessage, MessageChannel outputChannel) {
@@ -716,6 +717,7 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
return this.disconnect.get();
}
@Override
public String toString() {
return "processed CONNECT(" + this.connect.get() + ")-CONNECTED(" +
this.connected.get() + ")-DISCONNECT(" + this.disconnect.get() + ")";

View File

@@ -187,6 +187,7 @@ public class SubProtocolWebSocketHandler
/**
* Return all supported protocols.
*/
@Override
public List<String> getSubProtocols() {
return new ArrayList<>(this.protocolHandlerLookup.keySet());
}
@@ -676,6 +677,7 @@ public class SubProtocolWebSocketHandler
}
}
@Override
public String toString() {
return SubProtocolWebSocketHandler.this.sessions.size() +
" current WS(" + this.webSocket.get() +

View File

@@ -82,6 +82,7 @@ public abstract class AbstractXhrTransport implements XhrTransport {
/**
* Whether XHR streaming is disabled or not.
*/
@Override
public boolean isXhrStreamingDisabled() {
return this.xhrStreamingDisabled;
}

View File

@@ -135,6 +135,7 @@ public class TransportHandlingSockJsService extends AbstractSockJsService implem
this.messageCodec = messageCodec;
}
@Override
public SockJsMessageCodec getMessageCodec() {
Assert.state(this.messageCodec != null, "A SockJsMessageCodec is required but not available: " +
"Add Jackson to the classpath, or configure a custom SockJsMessageCodec.");

View File

@@ -137,6 +137,7 @@ public abstract class AbstractHttpSockJsSession extends AbstractSockJsSession {
/**
* Return the selected sub-protocol to use.
*/
@Override
@Nullable
public String getAcceptedProtocol() {
return this.acceptedProtocol;

View File

@@ -162,6 +162,7 @@ public abstract class AbstractSockJsSession implements SockJsSession {
// Message sending
@Override
public final void sendMessage(WebSocketMessage<?> message) throws IOException {
Assert.state(!isClosed(), "Cannot send a message when session is closed");
Assert.isInstanceOf(TextMessage.class, message, "SockJS supports text messages only");

View File

@@ -137,6 +137,7 @@ public class TestWebSocketSession implements WebSocketSession {
this.remoteAddress = remoteAddress;
}
@Override
public String getAcceptedProtocol() {
return this.protocol;
}

View File

@@ -53,6 +53,7 @@ public class HandshakeInterceptorChainTests extends AbstractHttpRequestTests {
private Map<String, Object> attributes;
@Override
@BeforeEach
public void setup() {
super.setup();

View File

@@ -74,6 +74,7 @@ public class StubSockJsServiceConfig implements SockJsServiceConfig {
this.messageCodec = messageCodec;
}
@Override
public int getHttpMessageCacheSize() {
return this.httpMessageCacheSize;
}