From b965171b41e0abdb07ca562eb383a533f25fceb4 Mon Sep 17 00:00:00 2001 From: Johnny Lim Date: Tue, 7 Nov 2017 02:22:50 +0900 Subject: [PATCH] Add missing null check in FileSystemWatcher.stopAfter() Closes gh-10941 --- .../boot/devtools/filewatch/FileSystemWatcher.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java b/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java index c3530b3b7f..9c44a4e0d3 100644 --- a/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java +++ b/spring-boot-devtools/src/main/java/org/springframework/boot/devtools/filewatch/FileSystemWatcher.java @@ -194,7 +194,7 @@ public class FileSystemWatcher { } this.watchThread = null; } - if (Thread.currentThread() != thread) { + if (thread != null && Thread.currentThread() != thread) { try { thread.join(); }