Skip to content

Commit 03f0c57

Browse files
marcwrobelsbrannen
authored andcommitted
Fix and improve Javadoc in spring-websocket
Closes gh-28788
1 parent d274e89 commit 03f0c57

25 files changed

+60
-60
lines changed

spring-websocket/src/main/java/org/springframework/web/socket/CloseStatus.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -139,7 +139,7 @@ public final class CloseStatus implements Serializable {
139139
public static final CloseStatus TLS_HANDSHAKE_FAILURE = new CloseStatus(1015);
140140

141141
/**
142-
* A status code for use within the framework the indicate a session has
142+
* A status code for use within the framework that indicates a session has
143143
* become unreliable (e.g. timed out while sending a message) and extra
144144
* care should be exercised, e.g. avoid sending any further data to the
145145
* client that may be done during normal shutdown.

spring-websocket/src/main/java/org/springframework/web/socket/WebSocketExtension.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -83,7 +83,7 @@ public WebSocketExtension(String name, @Nullable Map<String, String> parameters)
8383

8484

8585
/**
86-
* Return the name of the extension (never {@code null) or empty}.
86+
* Return the name of the extension (never {@code null} or empty).
8787
*/
8888
public String getName() {
8989
return this.name;

spring-websocket/src/main/java/org/springframework/web/socket/WebSocketSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -121,7 +121,7 @@ public interface WebSocketSession extends Closeable {
121121
/**
122122
* Send a WebSocket message: either {@link TextMessage} or {@link BinaryMessage}.
123123
* <p><strong>Note:</strong> The underlying standard WebSocket session (JSR-356) does
124-
* not allow concurrent sending. Therefore sending must be synchronized. To ensure
124+
* not allow concurrent sending. Therefore, sending must be synchronized. To ensure
125125
* that, one option is to wrap the {@code WebSocketSession} with the
126126
* {@link org.springframework.web.socket.handler.ConcurrentWebSocketSessionDecorator
127127
* ConcurrentWebSocketSessionDecorator}.

spring-websocket/src/main/java/org/springframework/web/socket/adapter/jetty/JettyWebSocketSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ public JettyWebSocketSession(Map<String, Object> attributes) {
9595
* Create a new {@link JettyWebSocketSession} instance associated with the given user.
9696
* @param attributes the attributes from the HTTP handshake to associate with the WebSocket
9797
* session; the provided attributes are copied, the original map is not used.
98-
* @param user the user associated with the session; if {@code null} we'll fallback on the
98+
* @param user the user associated with the session; if {@code null} we'll fall back on the
9999
* user available via {@link org.eclipse.jetty.websocket.api.Session#getUpgradeRequest()}
100100
*/
101101
public JettyWebSocketSession(Map<String, Object> attributes, @Nullable Principal user) {

spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/ConvertingEncoderDecoderSupport.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -101,7 +101,7 @@ public void destroy() {
101101
}
102102

103103
/**
104-
* Strategy method used to obtain the {@link ConversionService}. By default this
104+
* Strategy method used to obtain the {@link ConversionService}. By default, this
105105
* method expects a bean named {@code 'webSocketConversionService'} in the
106106
* {@link #getApplicationContext() active ApplicationContext}.
107107
* @return the {@link ConversionService} (never null)
@@ -119,7 +119,7 @@ protected ConversionService getConversionService() {
119119
}
120120

121121
/**
122-
* Returns the active {@link ApplicationContext}. Be default this method obtains
122+
* Returns the active {@link ApplicationContext}. By default, this method obtains
123123
* the context via {@link ContextLoader#getCurrentWebApplicationContext()}, which
124124
* finds the ApplicationContext loaded via {@link ContextLoader} typically in a
125125
* Servlet container environment. When not running in a Servlet container and
@@ -132,15 +132,15 @@ protected ApplicationContext getApplicationContext() {
132132
}
133133

134134
/**
135-
* Returns the type being converted. By default the type is resolved using
135+
* Returns the type being converted. By default, the type is resolved using
136136
* the generic arguments of the class.
137137
*/
138138
protected TypeDescriptor getType() {
139139
return TypeDescriptor.valueOf(resolveTypeArguments()[0]);
140140
}
141141

142142
/**
143-
* Returns the websocket message type. By default the type is resolved using
143+
* Returns the websocket message type. By default, the type is resolved using
144144
* the generic arguments of the class.
145145
*/
146146
protected TypeDescriptor getMessageType() {

spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardToWebSocketExtensionAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2016 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -26,8 +26,8 @@
2626
import org.springframework.web.socket.WebSocketExtension;
2727

2828
/**
29-
* A sub-class of {@link org.springframework.web.socket.WebSocketExtension} that
30-
* can be constructed from an {@link javax.websocket.Extension}.
29+
* A subclass of {@link org.springframework.web.socket.WebSocketExtension} that
30+
* can be constructed from a {@link javax.websocket.Extension}.
3131
*
3232
* @author Rossen Stoyanchev
3333
* @since 4.0

spring-websocket/src/main/java/org/springframework/web/socket/adapter/standard/StandardWebSocketSession.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2018 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -95,7 +95,7 @@ public StandardWebSocketSession(@Nullable HttpHeaders headers, @Nullable Map<Str
9595
* @param localAddress the address on which the request was received
9696
* @param remoteAddress the address of the remote client
9797
* @param user the user associated with the session; if {@code null} we'll
98-
* fallback on the user available in the underlying WebSocket session
98+
* fall back on the user available in the underlying WebSocket session
9999
*/
100100
public StandardWebSocketSession(@Nullable HttpHeaders headers, @Nullable Map<String, Object> attributes,
101101
@Nullable InetSocketAddress localAddress, @Nullable InetSocketAddress remoteAddress,

spring-websocket/src/main/java/org/springframework/web/socket/client/ConnectionManagerSupport.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2020 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -81,7 +81,7 @@ public boolean isAutoStartup() {
8181
/**
8282
* Specify the phase in which a connection should be established to the remote
8383
* endpoint and subsequently closed. The startup order proceeds from lowest to
84-
* highest, and the shutdown order is the reverse of that. By default this value is
84+
* highest, and the shutdown order is the reverse of that. By default, this value is
8585
* Integer.MAX_VALUE meaning that this endpoint connection factory connects as late as
8686
* possible and is closed as soon as possible.
8787
*/

spring-websocket/src/main/java/org/springframework/web/socket/client/jetty/JettyWebSocketClient.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -199,7 +199,7 @@ public ListenableFuture<WebSocketSession> doHandshakeInternal(WebSocketHandler w
199199

200200
/**
201201
* Return the user to make available through {@link WebSocketSession#getPrincipal()}.
202-
* By default this method returns {@code null}
202+
* By default, this method returns {@code null}
203203
*/
204204
@Nullable
205205
protected Principal getUser() {

spring-websocket/src/main/java/org/springframework/web/socket/config/annotation/AbstractWebSocketHandlerRegistration.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2021 the original author or authors.
2+
* Copyright 2002-2022 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -36,7 +36,7 @@
3636

3737
/**
3838
* Base class for {@link WebSocketHandlerRegistration WebSocketHandlerRegistrations} that gathers all the configuration
39-
* options but allows sub-classes to put together the actual HTTP request mappings.
39+
* options but allows subclasses to put together the actual HTTP request mappings.
4040
*
4141
* @author Rossen Stoyanchev
4242
* @author Sebastien Deleuze

0 commit comments

Comments
 (0)