From bc1955bff31c94614023cf0eff55ebee78f7edf0 Mon Sep 17 00:00:00 2001 From: "Kristian S. Stangeland" Date: Thu, 7 Feb 2013 20:07:33 +0100 Subject: [PATCH] Don't attempt to clean up static members during an update. --- .../main/java/com/comphenix/protocol/ProtocolLibrary.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java index 28c1ef9d..cbeef78b 100644 --- a/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java +++ b/ProtocolLib/src/main/java/com/comphenix/protocol/ProtocolLibrary.java @@ -40,6 +40,7 @@ import com.comphenix.protocol.injector.PacketFilterManager; import com.comphenix.protocol.injector.PacketFilterManager.PlayerInjectHooks; import com.comphenix.protocol.metrics.Statistics; import com.comphenix.protocol.metrics.Updater; +import com.comphenix.protocol.metrics.Updater.UpdateResult; import com.comphenix.protocol.reflect.compiler.BackgroundCompiler; /** @@ -430,8 +431,10 @@ public class ProtocolLibrary extends JavaPlugin { reporter = null; // Leaky ClassLoader begone! - CleanupStaticMembers cleanup = new CleanupStaticMembers(getClassLoader(), reporter); - cleanup.resetAll(); + if (updater == null || updater.getResult() != UpdateResult.SUCCESS) { + CleanupStaticMembers cleanup = new CleanupStaticMembers(getClassLoader(), reporter); + cleanup.resetAll(); + } } // Get the Bukkit logger first, before we try to create our own