From 30d1a5d3fd4f5a6d682646f4ee2e790433884c6a Mon Sep 17 00:00:00 2001 From: Andrew Ardill Date: Mon, 21 Feb 2011 12:30:45 +1100 Subject: [PATCH] returning if a thread is not alive should happen before any changes to the list of workers, hence the return statement should be in the synchronized block. --- .../org/bukkit/craftbukkit/scheduler/CraftThreadManager.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftThreadManager.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftThreadManager.java index d63b458e43..29defcdaaf 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftThreadManager.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftThreadManager.java @@ -61,8 +61,8 @@ public class CraftThreadManager { return craftWorker.isAlive(); } } + // didn't find it, so it must have been removed + return false; } - // didn't find it, so it must have been removed - return false; } }