835bc39b03
Updated Upstream (Bukkit/CraftBukkit/Spigot) Bukkit Changes: 2dcc44dc SPIGOT-4307: Fix hacky API for banners on shields e0fc6572 SPIGOT-4309: Add "forced" display of particles efeeab2f Add index to README.md for easier navigation f502bc6f Update to Minecraft 1.13.1 CraftBukkit Changes: d0bb0a1d Fix some tests randomly failing 997d378d Fix client stall in specific teleportation scenarios b3dc2366 SPIGOT-4307: Fix hacky API for banners on shields 2a271162 SPIGOT-4301: Fix more invalid enchants 5d0d83bb SPIGOT-4309: Add "forced" display of particles a6772578 Add additional tests for CraftBlockData ce1af0c3 Update to Minecraft 1.13.1 Spigot Changes: 2440e189 Rebuild patches 4ecffced Update to Minecraft 1.13.1
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
From 55202d86e3df4ab6373ce7a4ea747f62e9641386 Mon Sep 17 00:00:00 2001
|
|
From: Brokkonaut <hannos17@gmx.de>
|
|
Date: Fri, 20 Oct 2017 04:33:45 +0200
|
|
Subject: [PATCH] Replace HashSet with fastutil's ObjectOpenHashSet in
|
|
HashTreeSet
|
|
|
|
HashSet sometimes uses compareTo() instead of equals() and this breaks the comparison of net.minecraft.server.NextTickListEntry (the only place where HashTreeSet is used).
|
|
|
|
In this cases duplicate entries could be added to the HashSet of HashTreeSet, because NextTickListEntry.compareTo() does not return 0, even if NextTickListEntry.equals() returns true.
|
|
|
|
ObjectOpenHashSet never uses compareTo(), so the inconsistencies of NextTickListEntry cause no problems.
|
|
|
|
Fixes https://github.com/PaperMC/Paper/issues/588
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java b/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
|
|
index 80a5c29f3b..cd864c4047 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/HashTreeSet.java
|
|
@@ -8,7 +8,7 @@ import java.util.TreeSet;
|
|
|
|
public class HashTreeSet<V> implements Set<V> {
|
|
|
|
- private HashSet<V> hash = new HashSet<V>();
|
|
+ private Set<V> hash = new it.unimi.dsi.fastutil.objects.ObjectOpenHashSet<V>(); //Paper - Replace java.util.HashSet with ObjectOpenHashSet
|
|
private TreeSet<V> tree = new TreeSet<V>();
|
|
|
|
public HashTreeSet() {
|
|
--
|
|
2.18.0
|
|
|