]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7384 ensure no thread can await its own termination in Monitor 789/head
authorSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 24 Feb 2016 12:50:17 +0000 (13:50 +0100)
committerSébastien Lesaint <sebastien.lesaint@sonarsource.com>
Wed, 24 Feb 2016 14:52:02 +0000 (15:52 +0100)
server/sonar-process-monitor/src/main/java/org/sonar/process/monitor/Monitor.java

index 8f9aa7e59cf50621e8e30f435bf28d26257e1b8a..1aef72c479c5253e6a6c8a6f7bf0730b50d7d515 100644 (file)
@@ -451,7 +451,7 @@ public class Monitor {
   }
 
   private static void awaitTermination(@Nullable Thread t) {
-    if (t == null) {
+    if (t == null || Thread.currentThread() == t) {
       return;
     }