diff options
author | md_5 <git@md-5.net> | 2015-06-07 19:51:26 +1000 |
---|---|---|
committer | md_5 <git@md-5.net> | 2015-06-07 19:51:26 +1000 |
commit | 7330b853ec407d456a2dda9d6d453a3f3a367f72 (patch) | |
tree | 7751fb9d65fc629268d4534dd5af9df07c2c6478 /nms-patches/UserCache.patch | |
parent | 7723b90d913efb5cd9cdf85b772bbd4520540ec6 (diff) | |
download | craftbukkit-7330b853ec407d456a2dda9d6d453a3f3a367f72.tar craftbukkit-7330b853ec407d456a2dda9d6d453a3f3a367f72.tar.gz craftbukkit-7330b853ec407d456a2dda9d6d453a3f3a367f72.tar.lz craftbukkit-7330b853ec407d456a2dda9d6d453a3f3a367f72.tar.xz craftbukkit-7330b853ec407d456a2dda9d6d453a3f3a367f72.zip |
[SPIGOT-461] Use a more appropriate collection for conccurent UserCache
Diffstat (limited to 'nms-patches/UserCache.patch')
-rw-r--r-- | nms-patches/UserCache.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/nms-patches/UserCache.patch b/nms-patches/UserCache.patch new file mode 100644 index 00000000..8db04afc --- /dev/null +++ b/nms-patches/UserCache.patch @@ -0,0 +1,25 @@ +--- a/net/minecraft/server/UserCache.java ++++ b/net/minecraft/server/UserCache.java +@@ -42,7 +42,7 @@ + public static final SimpleDateFormat a = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z"); + private final Map<String, UserCache.UserCacheEntry> c = Maps.newHashMap(); + private final Map<UUID, UserCache.UserCacheEntry> d = Maps.newHashMap(); +- private final LinkedList<GameProfile> e = Lists.newLinkedList(); ++ private final java.util.Deque<GameProfile> e = new java.util.concurrent.ConcurrentLinkedDeque<GameProfile>(); // CraftBukkit + private final MinecraftServer f; + protected final Gson b; + private final File g; +@@ -323,11 +323,11 @@ + } + } + +- public JsonElement serialize(Object object, Type type, JsonSerializationContext jsonserializationcontext) { ++ public JsonElement serialize(UserCacheEntry object, Type type, JsonSerializationContext jsonserializationcontext) { // CraftBukkit - decompile error + return this.a((UserCache.UserCacheEntry) object, type, jsonserializationcontext); + } + +- public Object deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { ++ public UserCacheEntry deserialize(JsonElement jsonelement, Type type, JsonDeserializationContext jsondeserializationcontext) throws JsonParseException { // CraftBukkit - decompile error + return this.a(jsonelement, type, jsondeserializationcontext); + } + |