Skip to content

Commit 753347e

Browse files
committed
Consistent static final logger declarations
1 parent 997278e commit 753347e

File tree

7 files changed

+21
-22
lines changed

7 files changed

+21
-22
lines changed

spring-aop/src/main/java/org/springframework/aop/framework/CglibAopProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ class CglibAopProxy implements AopProxy, Serializable {
9494

9595

9696
/** Logger available to subclasses; static to optimize serialization */
97-
protected final static Log logger = LogFactory.getLog(CglibAopProxy.class);
97+
protected static final Log logger = LogFactory.getLog(CglibAopProxy.class);
9898

9999
/** Keeps track of the Classes that we have validated for final methods */
100100
private static final Map<Class<?>, Boolean> validatedClasses = new WeakHashMap<Class<?>, Boolean>();

spring-context/src/main/java/org/springframework/jmx/access/ConnectorDelegate.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2012 the original author or authors.
2+
* Copyright 2002-2015 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.
@@ -37,7 +37,7 @@
3737
*/
3838
class ConnectorDelegate {
3939

40-
private final static Log logger = LogFactory.getLog(ConnectorDelegate.class);
40+
private static final Log logger = LogFactory.getLog(ConnectorDelegate.class);
4141

4242
private JMXConnector connector;
4343

spring-messaging/src/main/java/org/springframework/messaging/simp/annotation/support/SubscriptionMethodReturnValueHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
*/
5151
public class SubscriptionMethodReturnValueHandler implements HandlerMethodReturnValueHandler {
5252

53-
private static Log logger = LogFactory.getLog(SubscriptionMethodReturnValueHandler.class);
53+
private static final Log logger = LogFactory.getLog(SubscriptionMethodReturnValueHandler.class);
5454

5555

5656
private final MessageSendingOperations<String> messagingTemplate;

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 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.
@@ -32,7 +32,6 @@
3232
import org.springframework.web.socket.messaging.SubProtocolHandler;
3333
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
3434

35-
3635
/**
3736
* A central class for aggregating information about internal state and counters
3837
* from key infrastructure components of the setup that comes with
@@ -51,7 +50,7 @@
5150
*/
5251
public class WebSocketMessageBrokerStats {
5352

54-
private static Log logger = LogFactory.getLog(WebSocketMessageBrokerStats.class);
53+
private static final Log logger = LogFactory.getLog(WebSocketMessageBrokerStats.class);
5554

5655

5756
private SubProtocolWebSocketHandler webSocketHandler;
@@ -181,8 +180,8 @@ public String getSockJsTaskSchedulerStatsInfo() {
181180
}
182181

183182
private String getExecutorStatsInfo(Executor executor) {
184-
String s = executor.toString();
185-
return s.substring(s.indexOf("pool"), s.length() - 1);
183+
String str = executor.toString();
184+
return str.substring(str.indexOf("pool"), str.length() - 1);
186185
}
187186

188187
public String toString() {

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070
*/
7171
public class WebSocketStompClient extends StompClientSupport implements SmartLifecycle {
7272

73-
private static Log logger = LogFactory.getLog(WebSocketStompClient.class);
73+
private static final Log logger = LogFactory.getLog(WebSocketStompClient.class);
7474

7575

7676
private final WebSocketClient webSocketClient;

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
*/
4646
class DefaultTransportRequest implements TransportRequest {
4747

48-
private static Log logger = LogFactory.getLog(DefaultTransportRequest.class);
48+
private static final Log logger = LogFactory.getLog(DefaultTransportRequest.class);
4949

5050

5151
private final SockJsUrlInfo sockJsUrlInfo;
@@ -75,10 +75,10 @@ public DefaultTransportRequest(SockJsUrlInfo sockJsUrlInfo,
7575
HttpHeaders handshakeHeaders, HttpHeaders httpRequestHeaders,
7676
Transport transport, TransportType serverTransportType, SockJsMessageCodec codec) {
7777

78-
Assert.notNull(sockJsUrlInfo, "'sockJsUrlInfo' is required");
79-
Assert.notNull(transport, "'transport' is required");
80-
Assert.notNull(serverTransportType, "'transportType' is required");
81-
Assert.notNull(codec, "'codec' is required");
78+
Assert.notNull(sockJsUrlInfo, "SockJsUrlInfo is required");
79+
Assert.notNull(transport, "Transport is required");
80+
Assert.notNull(serverTransportType, "TransportType is required");
81+
Assert.notNull(codec, "SockJsMessageCodec is required");
8282
this.sockJsUrlInfo = sockJsUrlInfo;
8383
this.handshakeHeaders = (handshakeHeaders != null ? handshakeHeaders : new HttpHeaders());
8484
this.httpRequestHeaders = (httpRequestHeaders != null ? httpRequestHeaders : new HttpHeaders());

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 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.
@@ -17,7 +17,7 @@
1717
package org.springframework.web.socket.sockjs.client;
1818

1919
import java.net.URI;
20-
import java.util.Arrays;
20+
import java.util.Collections;
2121
import java.util.List;
2222
import java.util.concurrent.atomic.AtomicInteger;
2323

@@ -47,15 +47,15 @@
4747
*/
4848
public class WebSocketTransport implements Transport, Lifecycle {
4949

50-
private static Log logger = LogFactory.getLog(WebSocketTransport.class);
50+
private static final Log logger = LogFactory.getLog(WebSocketTransport.class);
5151

5252
private final WebSocketClient webSocketClient;
5353

5454
private volatile boolean running = false;
5555

5656

5757
public WebSocketTransport(WebSocketClient webSocketClient) {
58-
Assert.notNull(webSocketClient, "'webSocketClient' is required");
58+
Assert.notNull(webSocketClient, "WebSocketClient is required");
5959
this.webSocketClient = webSocketClient;
6060
}
6161

@@ -69,7 +69,7 @@ public WebSocketClient getWebSocketClient() {
6969

7070
@Override
7171
public List<TransportType> getTransportTypes() {
72-
return Arrays.asList(TransportType.WEBSOCKET);
72+
return Collections.singletonList(TransportType.WEBSOCKET);
7373
}
7474

7575
@Override
@@ -146,7 +146,7 @@ private static class ClientSockJsWebSocketHandler extends TextWebSocketHandler {
146146

147147
private final AtomicInteger connectCount = new AtomicInteger(0);
148148

149-
private ClientSockJsWebSocketHandler(WebSocketClientSockJsSession session) {
149+
public ClientSockJsWebSocketHandler(WebSocketClientSockJsSession session) {
150150
Assert.notNull(session);
151151
this.sockJsSession = session;
152152
}
@@ -173,4 +173,4 @@ public void afterConnectionClosed(WebSocketSession webSocketSession, CloseStatus
173173
}
174174
}
175175

176-
}
176+
}

0 commit comments

Comments
 (0)