Merge pull request #17837 from chefdd

* pr/17837:
  Simplify some code

Closes gh-17837
This commit is contained in:
Stephane Nicoll 2019-08-14 08:38:49 +02:00
commit f8f3733e1c
1 changed files with 1 additions and 2 deletions

View File

@ -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");