Commit 6fab5b59 authored by 周武栋's avatar 周武栋 Committed by Stephane Nicoll

Simplify some code

See gh-17837
parent 468b2e6d
......@@ -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");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment