Skip to content

Commit 32fcff5

Browse files
committed
Polishing
1 parent 9991649 commit 32fcff5

File tree

5 files changed

+11
-14
lines changed

5 files changed

+11
-14
lines changed

spring-messaging/src/main/java/org/springframework/messaging/simp/config/StompBrokerRelayRegistration.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-2020 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.
@@ -231,8 +231,8 @@ protected String getUserRegistryBroadcast() {
231231
}
232232

233233

234+
@Override
234235
protected StompBrokerRelayMessageHandler getMessageHandler(SubscribableChannel brokerChannel) {
235-
236236
StompBrokerRelayMessageHandler handler = new StompBrokerRelayMessageHandler(
237237
getClientInboundChannel(), getClientOutboundChannel(),
238238
brokerChannel, getDestinationPrefixes());

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

Lines changed: 1 addition & 3 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-2020 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.
@@ -66,7 +66,6 @@ public interface WebSocketSession {
6666
* is closed. In a typical {@link WebSocketHandler} implementation this
6767
* stream is composed into the overall processing flow, so that when the
6868
* connection is closed, handling will end.
69-
*
7069
* <p>See the class-level doc of {@link WebSocketHandler} and the reference
7170
* for more details and examples of how to handle the session.
7271
*/
@@ -76,7 +75,6 @@ public interface WebSocketSession {
7675
* Give a source of outgoing messages, write the messages and return a
7776
* {@code Mono<Void>} that completes when the source completes and writing
7877
* is done.
79-
*
8078
* <p>See the class-level doc of {@link WebSocketHandler} and the reference
8179
* for more details and examples of how to handle the session.
8280
*/

spring-webmvc/src/main/java/org/springframework/web/servlet/config/AnnotationDrivenBeanDefinitionParser.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2019 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -162,7 +162,7 @@ class AnnotationDrivenBeanDefinitionParser implements BeanDefinitionParser {
162162

163163
private static final boolean javaxValidationPresent;
164164

165-
private static boolean romePresent;
165+
private static final boolean romePresent;
166166

167167
private static final boolean jaxb2Present;
168168

@@ -208,7 +208,7 @@ public BeanDefinition parse(Element element, ParserContext context) {
208208
handlerMappingDef.getPropertyValues().add("contentNegotiationManager", contentNegotiationManager);
209209

210210
if (element.hasAttribute("enable-matrix-variables")) {
211-
Boolean enableMatrixVariables = Boolean.valueOf(element.getAttribute("enable-matrix-variables"));
211+
boolean enableMatrixVariables = Boolean.parseBoolean(element.getAttribute("enable-matrix-variables"));
212212
handlerMappingDef.getPropertyValues().add("removeSemicolonContent", !enableMatrixVariables);
213213
}
214214

@@ -569,7 +569,7 @@ private ManagedList<?> getMessageConverters(Element element, @Nullable Object so
569569
}
570570
}
571571

572-
if (convertersElement == null || Boolean.valueOf(convertersElement.getAttribute("register-defaults"))) {
572+
if (convertersElement == null || Boolean.parseBoolean(convertersElement.getAttribute("register-defaults"))) {
573573
messageConverters.setSource(source);
574574
messageConverters.add(createConverterDefinition(ByteArrayHttpMessageConverter.class, source));
575575

spring-webmvc/src/main/java/org/springframework/web/servlet/config/ResourcesBeanDefinitionParser.java

Lines changed: 3 additions & 3 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-2020 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 @@ class ResourcesBeanDefinitionParser implements BeanDefinitionParser {
8181

8282
private static final String RESOURCE_URL_PROVIDER = "mvcResourceUrlProvider";
8383

84-
private static final boolean isWebJarsAssetLocatorPresent = ClassUtils.isPresent(
84+
private static final boolean webJarsPresent = ClassUtils.isPresent(
8585
"org.webjars.WebJarAssetLocator", ResourcesBeanDefinitionParser.class.getClassLoader());
8686

8787

@@ -331,7 +331,7 @@ private void parseResourceResolversTransformers(boolean isAutoRegistration,
331331
}
332332

333333
if (isAutoRegistration) {
334-
if (isWebJarsAssetLocatorPresent) {
334+
if (webJarsPresent) {
335335
RootBeanDefinition webJarsResolverDef = new RootBeanDefinition(WebJarsResourceResolver.class);
336336
webJarsResolverDef.setSource(source);
337337
webJarsResolverDef.setRole(BeanDefinition.ROLE_INFRASTRUCTURE);

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2017 the original author or authors.
2+
* Copyright 2002-2020 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.
@@ -120,7 +120,6 @@ public interface WebSocketSession extends Closeable {
120120

121121
/**
122122
* Send a WebSocket message: either {@link TextMessage} or {@link BinaryMessage}.
123-
*
124123
* <p><strong>Note:</strong> The underlying standard WebSocket session (JSR-356) does
125124
* not allow concurrent sending. Therefore sending must be synchronized. To ensure
126125
* that, one option is to wrap the {@code WebSocketSession} with the

0 commit comments

Comments
 (0)