mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Consistent static final logger declarations
(cherry picked from commit 753347e)
This commit is contained in:
@@ -93,7 +93,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>();
|
||||
@@ -304,13 +304,13 @@ class CglibAopProxy implements AopProxy, Serializable {
|
||||
Callback targetDispatcher = isStatic ?
|
||||
new StaticDispatcher(this.advised.getTargetSource().getTarget()) : new SerializableNoOp();
|
||||
|
||||
Callback[] mainCallbacks = new Callback[]{
|
||||
aopInterceptor, // for normal advice
|
||||
targetInterceptor, // invoke target without considering advice, if optimized
|
||||
new SerializableNoOp(), // no override for methods mapped to this
|
||||
targetDispatcher, this.advisedDispatcher,
|
||||
new EqualsInterceptor(this.advised),
|
||||
new HashCodeInterceptor(this.advised)
|
||||
Callback[] mainCallbacks = new Callback[] {
|
||||
aopInterceptor, // for normal advice
|
||||
targetInterceptor, // invoke target without considering advice, if optimized
|
||||
new SerializableNoOp(), // no override for methods mapped to this
|
||||
targetDispatcher, this.advisedDispatcher,
|
||||
new EqualsInterceptor(this.advised),
|
||||
new HashCodeInterceptor(this.advised)
|
||||
};
|
||||
|
||||
Callback[] callbacks;
|
||||
@@ -702,6 +702,7 @@ class CglibAopProxy implements AopProxy, Serializable {
|
||||
|
||||
public CglibMethodInvocation(Object proxy, Object target, Method method, Object[] arguments,
|
||||
Class<?> targetClass, List<Object> interceptorsAndDynamicMethodMatchers, MethodProxy methodProxy) {
|
||||
|
||||
super(proxy, target, method, arguments, targetClass, interceptorsAndDynamicMethodMatchers);
|
||||
this.methodProxy = methodProxy;
|
||||
this.publicMethod = Modifier.isPublic(method.getModifiers());
|
||||
@@ -821,8 +822,7 @@ class CglibAopProxy implements AopProxy, Serializable {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Method has advice and optimisations are enabled: " + method);
|
||||
}
|
||||
// We know that we are optimising so we can use the
|
||||
// FixedStaticChainInterceptors.
|
||||
// We know that we are optimising so we can use the FixedStaticChainInterceptors.
|
||||
int index = this.fixedInterceptorMap.get(key);
|
||||
return (index + this.fixedInterceptorOffset);
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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;
|
||||
|
||||
|
||||
+1
-1
@@ -48,7 +48,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;
|
||||
|
||||
+4
-5
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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() {
|
||||
|
||||
+5
-5
@@ -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;
|
||||
@@ -72,10 +72,10 @@ class DefaultTransportRequest implements TransportRequest {
|
||||
public DefaultTransportRequest(SockJsUrlInfo sockJsUrlInfo, HttpHeaders handshakeHeaders,
|
||||
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.transport = transport;
|
||||
|
||||
+7
-7
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* 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 {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user