Make fields final
Closes gh-33537
This commit is contained in:
@@ -35,9 +35,9 @@ import org.springframework.util.StringUtils;
|
||||
@ConfigurationProperties(prefix = "spring.devtools")
|
||||
public class DevToolsProperties {
|
||||
|
||||
private Restart restart = new Restart();
|
||||
private final Restart restart = new Restart();
|
||||
|
||||
private Livereload livereload = new Livereload();
|
||||
private final Livereload livereload = new Livereload();
|
||||
|
||||
@NestedConfigurationProperty
|
||||
private final RemoteDevToolsProperties remote = new RemoteDevToolsProperties();
|
||||
|
||||
@@ -46,9 +46,9 @@ public class RemoteDevToolsProperties {
|
||||
*/
|
||||
private String secretHeaderName = DEFAULT_SECRET_HEADER_NAME;
|
||||
|
||||
private Restart restart = new Restart();
|
||||
private final Restart restart = new Restart();
|
||||
|
||||
private Proxy proxy = new Proxy();
|
||||
private final Proxy proxy = new Proxy();
|
||||
|
||||
public String getContextPath() {
|
||||
return this.contextPath;
|
||||
|
||||
@@ -39,7 +39,7 @@ public class ClassPathFileSystemWatcher implements InitializingBean, DisposableB
|
||||
|
||||
private final FileSystemWatcher fileSystemWatcher;
|
||||
|
||||
private ClassPathRestartStrategy restartStrategy;
|
||||
private final ClassPathRestartStrategy restartStrategy;
|
||||
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ class DirectorySnapshot {
|
||||
|
||||
private final Date time;
|
||||
|
||||
private Set<FileSnapshot> files;
|
||||
private final Set<FileSnapshot> files;
|
||||
|
||||
/**
|
||||
* Create a new {@link DirectorySnapshot} for the given directory.
|
||||
|
||||
@@ -237,7 +237,7 @@ public class FileSystemWatcher {
|
||||
|
||||
private Map<File, DirectorySnapshot> directories;
|
||||
|
||||
private SnapshotStateRepository snapshotStateRepository;
|
||||
private final SnapshotStateRepository snapshotStateRepository;
|
||||
|
||||
private Watcher(AtomicInteger remainingScans, List<FileChangeListener> listeners, FileFilter triggerFilter,
|
||||
long pollInterval, long quietPeriod, Map<File, DirectorySnapshot> directories,
|
||||
|
||||
@@ -139,7 +139,7 @@ public class RemoteClientConfiguration implements InitializingBean {
|
||||
|
||||
private final String remoteUrl;
|
||||
|
||||
private ExecutorService executor = Executors.newSingleThreadExecutor();
|
||||
private final ExecutorService executor = Executors.newSingleThreadExecutor();
|
||||
|
||||
LiveReloadConfiguration(DevToolsProperties properties, ClientHttpRequestFactory clientHttpRequestFactory,
|
||||
@Value("${remoteUrl}") String remoteUrl) {
|
||||
|
||||
@@ -106,7 +106,7 @@ public class Restarter {
|
||||
|
||||
private boolean enabled = true;
|
||||
|
||||
private URL[] initialUrls;
|
||||
private final URL[] initialUrls;
|
||||
|
||||
private final String mainClassName;
|
||||
|
||||
|
||||
@@ -113,7 +113,7 @@ public class HttpTunnelConnection implements TunnelConnection {
|
||||
|
||||
private boolean open = true;
|
||||
|
||||
private AtomicLong requestSeq = new AtomicLong();
|
||||
private final AtomicLong requestSeq = new AtomicLong();
|
||||
|
||||
public TunnelChannel(WritableByteChannel incomingChannel, Closeable closeable) {
|
||||
this.forwarder = new HttpTunnelPayloadForwarder(incomingChannel);
|
||||
|
||||
@@ -214,7 +214,7 @@ public class HttpTunnelServer {
|
||||
|
||||
private boolean closed;
|
||||
|
||||
private AtomicLong responseSeq = new AtomicLong();
|
||||
private final AtomicLong responseSeq = new AtomicLong();
|
||||
|
||||
private long lastHttpRequestTime;
|
||||
|
||||
@@ -364,7 +364,7 @@ public class HttpTunnelServer {
|
||||
|
||||
private final ServerHttpResponse response;
|
||||
|
||||
private ServerHttpAsyncRequestControl async;
|
||||
private final ServerHttpAsyncRequestControl async;
|
||||
|
||||
private volatile boolean complete = false;
|
||||
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.util.Assert;
|
||||
*/
|
||||
public class HttpTunnelServerHandler implements Handler {
|
||||
|
||||
private HttpTunnelServer server;
|
||||
private final HttpTunnelServer server;
|
||||
|
||||
/**
|
||||
* Create a new {@link HttpTunnelServerHandler} instance.
|
||||
|
||||
Reference in New Issue
Block a user