From 6d191650446e3f390807ef302ab7083f220e2eb5 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Sat, 17 Sep 2011 22:37:45 +0100 Subject: [PATCH] Switched to native weak hashmap instead of guavas for SimplePluginManager By: Dinnerbone --- .../main/java/org/bukkit/plugin/SimplePluginManager.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java index 0e611cc3e8..204f08f16d 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java +++ b/paper-api/src/main/java/org/bukkit/plugin/SimplePluginManager.java @@ -1,7 +1,6 @@ package org.bukkit.plugin; import com.google.common.collect.ImmutableSet; -import com.google.common.collect.MapMaker; import java.io.File; import java.lang.reflect.Constructor; import java.util.ArrayList; @@ -18,6 +17,7 @@ import java.util.HashSet; import java.util.LinkedList; import java.util.Iterator; import java.util.LinkedHashMap; +import java.util.WeakHashMap; import java.util.logging.Level; import java.util.regex.Matcher; import org.bukkit.Server; @@ -472,7 +472,7 @@ public final class SimplePluginManager implements PluginManager { Map map = permSubs.get(name); if (map == null) { - map = new MapMaker().weakKeys().makeMap(); + map = new WeakHashMap(); permSubs.put(name, map); } @@ -507,7 +507,7 @@ public final class SimplePluginManager implements PluginManager { Map map = defSubs.get(op); if (map == null) { - map = new MapMaker().weakKeys().makeMap(); + map = new WeakHashMap(); defSubs.put(op, map); }