From aad2e0848229e767893f1be98c53e8d0e5554219 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 3 Oct 2018 21:18:47 -0400 Subject: [PATCH] [CI-SKIP] Remove Trove and update to fastutul 8 on -api These deps were marked as provided, not compile, so they were never exposed to plugins anyways as we THOUGHT we had done, oops. Well plugins can still add fastutil to their build and use the deps as provided by minecraft. This ensures -api side does not use a deprecated API as fastutil 8 removed the deprecated methods. --- .../0002-Add-FastUtil-to-Bukkit.patch | 27 +++++++++++++++ ...002-add-Trove-and-FastUtil-to-Bukkit.patch | 33 ------------------- .../0021-Use-ASM-for-event-executors.patch | 22 ++++++------- ...low-plugins-to-use-SLF4J-for-logging.patch | 8 ++--- 4 files changed, 42 insertions(+), 48 deletions(-) create mode 100644 Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch delete mode 100644 Spigot-API-Patches/0002-add-Trove-and-FastUtil-to-Bukkit.patch diff --git a/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch b/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch new file mode 100644 index 0000000000..c494448784 --- /dev/null +++ b/Spigot-API-Patches/0002-Add-FastUtil-to-Bukkit.patch @@ -0,0 +1,27 @@ +From 521b96be311beaf8b128080046c1140c3d910c61 Mon Sep 17 00:00:00 2001 +From: Aikar +Date: Fri, 1 Apr 2016 00:02:47 -0400 +Subject: [PATCH] Add FastUtil to Bukkit + +Doesn't expose to plugins, just allows Paper-API to use it for optimization + +diff --git a/pom.xml b/pom.xml +index 2a5846a18..b5cc156cd 100644 +--- a/pom.xml ++++ b/pom.xml +@@ -43,6 +43,12 @@ + + + ++ ++ it.unimi.dsi ++ fastutil ++ 8.2.2 ++ provided ++ + + commons-lang + commons-lang +-- +2.19.0 + diff --git a/Spigot-API-Patches/0002-add-Trove-and-FastUtil-to-Bukkit.patch b/Spigot-API-Patches/0002-add-Trove-and-FastUtil-to-Bukkit.patch deleted file mode 100644 index 5955b2f870..0000000000 --- a/Spigot-API-Patches/0002-add-Trove-and-FastUtil-to-Bukkit.patch +++ /dev/null @@ -1,33 +0,0 @@ -From ce4d9c868afb8ddb4fd84b26873509fffbde8de7 Mon Sep 17 00:00:00 2001 -From: Aikar -Date: Fri, 1 Apr 2016 00:02:47 -0400 -Subject: [PATCH] add Trove and FastUtil to Bukkit - - -diff --git a/pom.xml b/pom.xml -index 2a5846a1..d6cf92d1 100644 ---- a/pom.xml -+++ b/pom.xml -@@ -43,6 +43,19 @@ - - - -+ -+ net.sf.trove4j -+ trove4j -+ 3.0.3 -+ -+ provided -+ -+ -+ co.aikar -+ fastutil-lite -+ 1.0 -+ provided -+ - - commons-lang - commons-lang --- -2.19.0 - diff --git a/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch b/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch index c1f23571fb..45000fe33a 100644 --- a/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch +++ b/Spigot-API-Patches/0021-Use-ASM-for-event-executors.patch @@ -1,4 +1,4 @@ -From 2c838b46906d2b21e84956036ddf45bf4464bb30 Mon Sep 17 00:00:00 2001 +From f027f34cf88ec478b2d4a18131f4ded8915efd06 Mon Sep 17 00:00:00 2001 From: Techcable Date: Thu, 3 Mar 2016 13:20:33 -0700 Subject: [PATCH] Use ASM for event executors. @@ -6,10 +6,10 @@ Subject: [PATCH] Use ASM for event executors. Uses method handles for private or static methods. diff --git a/pom.xml b/pom.xml -index d6cf92d1..ffedf2e7 100644 +index b5cc156cd..310c30bb6 100644 --- a/pom.xml +++ b/pom.xml -@@ -116,6 +116,17 @@ +@@ -109,6 +109,17 @@ 1.3 test @@ -29,7 +29,7 @@ index d6cf92d1..ffedf2e7 100644 diff --git a/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java new file mode 100644 -index 00000000..9ff99e3b +index 000000000..9ff99e3b3 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/MethodHandleEventExecutor.java @@ -0,0 +1,40 @@ @@ -75,7 +75,7 @@ index 00000000..9ff99e3b +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java new file mode 100644 -index 00000000..f60f0100 +index 000000000..f60f01005 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/StaticMethodHandleEventExecutor.java @@ -0,0 +1,39 @@ @@ -120,7 +120,7 @@ index 00000000..f60f0100 +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java new file mode 100644 -index 00000000..140cf0ad +index 000000000..140cf0ad3 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ASMEventExecutorGenerator.java @@ -0,0 +1,44 @@ @@ -170,7 +170,7 @@ index 00000000..140cf0ad +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java new file mode 100644 -index 00000000..6941d9fb +index 000000000..6941d9fbf --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java @@ -0,0 +1,32 @@ @@ -208,7 +208,7 @@ index 00000000..6941d9fb +} diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java new file mode 100644 -index 00000000..1473ff8c +index 000000000..1473ff8cd --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/SafeClassDefiner.java @@ -0,0 +1,63 @@ @@ -277,7 +277,7 @@ index 00000000..1473ff8c +} diff --git a/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java new file mode 100644 -index 00000000..62acbf82 +index 000000000..62acbf821 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java @@ -0,0 +1,33 @@ @@ -315,7 +315,7 @@ index 00000000..62acbf82 + } +} diff --git a/src/main/java/org/bukkit/plugin/EventExecutor.java b/src/main/java/org/bukkit/plugin/EventExecutor.java -index 3b2c99ea..b45b6c1c 100644 +index 3b2c99ea7..b45b6c1c3 100644 --- a/src/main/java/org/bukkit/plugin/EventExecutor.java +++ b/src/main/java/org/bukkit/plugin/EventExecutor.java @@ -4,9 +4,81 @@ import org.bukkit.event.Event; @@ -401,7 +401,7 @@ index 3b2c99ea..b45b6c1c 100644 + // Paper end } diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java -index 3af99b5b..72d506d1 100644 +index 3af99b5bd..72d506d1f 100644 --- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java +++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java @@ -289,20 +289,7 @@ public final class JavaPluginLoader implements PluginLoader { diff --git a/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch b/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch index 59c72e6468..4cac57fd7f 100644 --- a/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch +++ b/Spigot-API-Patches/0066-Allow-plugins-to-use-SLF4J-for-logging.patch @@ -1,4 +1,4 @@ -From 2c601455d17d2da1b6434c426da4f820c5278a24 Mon Sep 17 00:00:00 2001 +From 2ea958ba37dce96fec2e891b14c3435f5e819be9 Mon Sep 17 00:00:00 2001 From: Minecrell Date: Thu, 21 Sep 2017 16:33:12 +0200 Subject: [PATCH] Allow plugins to use SLF4J for logging @@ -14,10 +14,10 @@ it without having to shade it in the plugin and going through several layers of logging abstraction. diff --git a/pom.xml b/pom.xml -index ffedf2e7..67d40f03 100644 +index 7ca5363b3..5fd948719 100644 --- a/pom.xml +++ b/pom.xml -@@ -103,6 +103,14 @@ +@@ -96,6 +96,14 @@ compile @@ -33,7 +33,7 @@ index ffedf2e7..67d40f03 100644 junit diff --git a/src/main/java/org/bukkit/plugin/Plugin.java b/src/main/java/org/bukkit/plugin/Plugin.java -index 55debf5d..8d2999ac 100644 +index 55debf5d5..8d2999ace 100644 --- a/src/main/java/org/bukkit/plugin/Plugin.java +++ b/src/main/java/org/bukkit/plugin/Plugin.java @@ -157,6 +157,12 @@ public interface Plugin extends TabExecutor {