Remove redundant assignment of default values to volatile fields

This commit is contained in:
Сергей Цыпанов
2020-06-17 10:48:00 +03:00
committed by Juergen Hoeller
parent 8099fc8178
commit 7949937655
37 changed files with 69 additions and 69 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 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.
@@ -44,7 +44,7 @@ public abstract class ConnectionManagerSupport implements SmartLifecycle {
private int phase = DEFAULT_PHASE;
private volatile boolean running = false;
private volatile boolean running;
private final Object lifecycleMonitor = new Object();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -101,7 +101,7 @@ public class SubProtocolWebSocketHandler
private final DefaultStats stats = new DefaultStats();
private volatile boolean running = false;
private volatile boolean running;
private final Object lifecycleMonitor = new Object();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -82,7 +82,7 @@ public class WebSocketStompClient extends StompClientSupport implements SmartLif
private int phase = DEFAULT_PHASE;
private volatile boolean running = false;
private volatile boolean running;
/**

View File

@@ -78,7 +78,7 @@ public class JettyRequestUpgradeStrategy implements RequestUpgradeStrategy, Serv
@Nullable
private ServletContext servletContext;
private volatile boolean running = false;
private volatile boolean running;
@Nullable
private volatile List<WebSocketExtension> supportedExtensions;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -107,7 +107,7 @@ public abstract class AbstractHandshakeHandler implements HandshakeHandler, Life
private final List<String> supportedProtocols = new ArrayList<>();
private volatile boolean running = false;
private volatile boolean running;
/**

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2018 the original author or authors.
* Copyright 2002-2020 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.
@@ -34,7 +34,7 @@ import org.springframework.web.servlet.handler.SimpleUrlHandlerMapping;
*/
public class WebSocketHandlerMapping extends SimpleUrlHandlerMapping implements SmartLifecycle {
private volatile boolean running = false;
private volatile boolean running;
@Override

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -67,7 +67,7 @@ public class WebSocketHttpRequestHandler implements HttpRequestHandler, Lifecycl
private final List<HandshakeInterceptor> interceptors = new ArrayList<>();
private volatile boolean running = false;
private volatile boolean running;
public WebSocketHttpRequestHandler(WebSocketHandler wsHandler) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -90,7 +90,7 @@ public class SockJsClient implements WebSocketClient, Lifecycle {
@Nullable
private TaskScheduler connectTimeoutScheduler;
private volatile boolean running = false;
private volatile boolean running;
private final Map<URI, ServerInfo> serverInfoCache = new ConcurrentHashMap<>();

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2017 the original author or authors.
* Copyright 2002-2020 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.
@@ -52,7 +52,7 @@ public class WebSocketTransport implements Transport, Lifecycle {
private final WebSocketClient webSocketClient;
private volatile boolean running = false;
private volatile boolean running;
public WebSocketTransport(WebSocketClient webSocketClient) {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2019 the original author or authors.
* Copyright 2002-2020 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.
@@ -58,7 +58,7 @@ public class SockJsHttpRequestHandler
private final WebSocketHandler webSocketHandler;
private volatile boolean running = false;
private volatile boolean running;
/**