Browse Source

Simplify some code

See gh-17837
pull/17864/head
周武栋 6 years ago committed by Stephane Nicoll
parent
commit
6fab5b591b
  1. 3
      spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java

3
spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java

@ -154,8 +154,7 @@ public class FileSystemWatcher { @@ -154,8 +154,7 @@ public class FileSystemWatcher {
synchronized (this.monitor) {
saveInitialSnapshots();
if (this.watchThread == null) {
Map<File, FolderSnapshot> localFolders = new HashMap<>();
localFolders.putAll(this.folders);
Map<File, FolderSnapshot> localFolders = new HashMap<>(this.folders);
this.watchThread = new Thread(new Watcher(this.remainingScans, new ArrayList<>(this.listeners),
this.triggerFilter, this.pollInterval, this.quietPeriod, localFolders));
this.watchThread.setName("File Watcher");

Loading…
Cancel
Save