提交 753347ea 编写于 作者: J Juergen Hoeller

Consistent static final logger declarations

上级 997278e3
......@@ -94,7 +94,7 @@ class CglibAopProxy implements AopProxy, Serializable {
/** Logger available to subclasses; static to optimize serialization */
protected final static Log logger = LogFactory.getLog(CglibAopProxy.class);
protected static final Log logger = LogFactory.getLog(CglibAopProxy.class);
/** Keeps track of the Classes that we have validated for final methods */
private static final Map<Class<?>, Boolean> validatedClasses = new WeakHashMap<Class<?>, Boolean>();
......
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -37,7 +37,7 @@ import org.springframework.jmx.support.JmxUtils;
*/
class ConnectorDelegate {
private final static Log logger = LogFactory.getLog(ConnectorDelegate.class);
private static final Log logger = LogFactory.getLog(ConnectorDelegate.class);
private JMXConnector connector;
......
......@@ -50,7 +50,7 @@ import org.springframework.util.Assert;
*/
public class SubscriptionMethodReturnValueHandler implements HandlerMethodReturnValueHandler {
private static Log logger = LogFactory.getLog(SubscriptionMethodReturnValueHandler.class);
private static final Log logger = LogFactory.getLog(SubscriptionMethodReturnValueHandler.class);
private final MessageSendingOperations<String> messagingTemplate;
......
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -32,7 +32,6 @@ import org.springframework.web.socket.messaging.StompSubProtocolHandler;
import org.springframework.web.socket.messaging.SubProtocolHandler;
import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
/**
* A central class for aggregating information about internal state and counters
* from key infrastructure components of the setup that comes with
......@@ -51,7 +50,7 @@ import org.springframework.web.socket.messaging.SubProtocolWebSocketHandler;
*/
public class WebSocketMessageBrokerStats {
private static Log logger = LogFactory.getLog(WebSocketMessageBrokerStats.class);
private static final Log logger = LogFactory.getLog(WebSocketMessageBrokerStats.class);
private SubProtocolWebSocketHandler webSocketHandler;
......@@ -181,8 +180,8 @@ public class WebSocketMessageBrokerStats {
}
private String getExecutorStatsInfo(Executor executor) {
String s = executor.toString();
return s.substring(s.indexOf("pool"), s.length() - 1);
String str = executor.toString();
return str.substring(str.indexOf("pool"), str.length() - 1);
}
public String toString() {
......
......@@ -70,7 +70,7 @@ import org.springframework.web.util.UriComponentsBuilder;
*/
public class WebSocketStompClient extends StompClientSupport implements SmartLifecycle {
private static Log logger = LogFactory.getLog(WebSocketStompClient.class);
private static final Log logger = LogFactory.getLog(WebSocketStompClient.class);
private final WebSocketClient webSocketClient;
......
......@@ -45,7 +45,7 @@ import org.springframework.web.socket.sockjs.transport.TransportType;
*/
class DefaultTransportRequest implements TransportRequest {
private static Log logger = LogFactory.getLog(DefaultTransportRequest.class);
private static final Log logger = LogFactory.getLog(DefaultTransportRequest.class);
private final SockJsUrlInfo sockJsUrlInfo;
......@@ -75,10 +75,10 @@ class DefaultTransportRequest implements TransportRequest {
HttpHeaders handshakeHeaders, HttpHeaders httpRequestHeaders,
Transport transport, TransportType serverTransportType, SockJsMessageCodec codec) {
Assert.notNull(sockJsUrlInfo, "'sockJsUrlInfo' is required");
Assert.notNull(transport, "'transport' is required");
Assert.notNull(serverTransportType, "'transportType' is required");
Assert.notNull(codec, "'codec' is required");
Assert.notNull(sockJsUrlInfo, "SockJsUrlInfo is required");
Assert.notNull(transport, "Transport is required");
Assert.notNull(serverTransportType, "TransportType is required");
Assert.notNull(codec, "SockJsMessageCodec is required");
this.sockJsUrlInfo = sockJsUrlInfo;
this.handshakeHeaders = (handshakeHeaders != null ? handshakeHeaders : new HttpHeaders());
this.httpRequestHeaders = (httpRequestHeaders != null ? httpRequestHeaders : new HttpHeaders());
......
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -17,7 +17,7 @@
package org.springframework.web.socket.sockjs.client;
import java.net.URI;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.atomic.AtomicInteger;
......@@ -47,7 +47,7 @@ import org.springframework.web.socket.sockjs.transport.TransportType;
*/
public class WebSocketTransport implements Transport, Lifecycle {
private static Log logger = LogFactory.getLog(WebSocketTransport.class);
private static final Log logger = LogFactory.getLog(WebSocketTransport.class);
private final WebSocketClient webSocketClient;
......@@ -55,7 +55,7 @@ public class WebSocketTransport implements Transport, Lifecycle {
public WebSocketTransport(WebSocketClient webSocketClient) {
Assert.notNull(webSocketClient, "'webSocketClient' is required");
Assert.notNull(webSocketClient, "WebSocketClient is required");
this.webSocketClient = webSocketClient;
}
......@@ -69,7 +69,7 @@ public class WebSocketTransport implements Transport, Lifecycle {
@Override
public List<TransportType> getTransportTypes() {
return Arrays.asList(TransportType.WEBSOCKET);
return Collections.singletonList(TransportType.WEBSOCKET);
}
@Override
......@@ -146,7 +146,7 @@ public class WebSocketTransport implements Transport, Lifecycle {
private final AtomicInteger connectCount = new AtomicInteger(0);
private ClientSockJsWebSocketHandler(WebSocketClientSockJsSession session) {
public ClientSockJsWebSocketHandler(WebSocketClientSockJsSession session) {
Assert.notNull(session);
this.sockJsSession = session;
}
......@@ -173,4 +173,4 @@ public class WebSocketTransport implements Transport, Lifecycle {
}
}
}
\ No newline at end of file
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册