From 6fab5b591b7df7794177b67ca81f92b7cfd6d547 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=A8=E6=AD=A6=E6=A0=8B?= Date: Mon, 12 Aug 2019 13:52:33 +0800 Subject: [PATCH] Simplify some code See gh-17837 --- .../boot/devtools/filewatch/FileSystemWatcher.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java index a22fe696eb..2182497a50 100644 --- a/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java +++ b/spring-boot-project/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java @@ -154,8 +154,7 @@ public class FileSystemWatcher { synchronized (this.monitor) { saveInitialSnapshots(); if (this.watchThread == null) { - Map localFolders = new HashMap<>(); - localFolders.putAll(this.folders); + Map 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");