Fix TimingsExport throwing an IAE due to legacy API usage

This commit is contained in:
Shane Freeder 2019-05-07 18:13:52 +01:00
parent 2d085853c6
commit b7281b6dfc

View file

@ -6,7 +6,7 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/FullServerTickHandler.java b/src/main/java/co/aikar/timings/FullServerTickHandler.java
new file mode 100644
index 00000000..64531fcc
index 000000000..64531fcce
--- /dev/null
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
@@ -0,0 +0,0 @@
@ -96,7 +96,7 @@ index 00000000..64531fcc
+}
diff --git a/src/main/java/co/aikar/timings/NullTimingHandler.java b/src/main/java/co/aikar/timings/NullTimingHandler.java
new file mode 100644
index 00000000..9b45ce88
index 000000000..9b45ce887
--- /dev/null
+++ b/src/main/java/co/aikar/timings/NullTimingHandler.java
@@ -0,0 +0,0 @@
@ -170,7 +170,7 @@ index 00000000..9b45ce88
+}
diff --git a/src/main/java/co/aikar/timings/TimedEventExecutor.java b/src/main/java/co/aikar/timings/TimedEventExecutor.java
new file mode 100644
index 00000000..933ecf9b
index 000000000..933ecf9bd
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
@@ -0,0 +0,0 @@
@ -259,7 +259,7 @@ index 00000000..933ecf9b
+}
diff --git a/src/main/java/co/aikar/timings/Timing.java b/src/main/java/co/aikar/timings/Timing.java
new file mode 100644
index 00000000..a21e5ead
index 000000000..a21e5ead5
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timing.java
@@ -0,0 +0,0 @@
@ -348,7 +348,7 @@ index 00000000..a21e5ead
+}
diff --git a/src/main/java/co/aikar/timings/TimingData.java b/src/main/java/co/aikar/timings/TimingData.java
new file mode 100644
index 00000000..a5d13a1e
index 000000000..a5d13a1e4
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingData.java
@@ -0,0 +0,0 @@
@ -476,7 +476,7 @@ index 00000000..a5d13a1e
+}
diff --git a/src/main/java/co/aikar/timings/TimingHandler.java b/src/main/java/co/aikar/timings/TimingHandler.java
new file mode 100644
index 00000000..cc0390c0
index 000000000..cc0390c06
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHandler.java
@@ -0,0 +0,0 @@
@ -709,7 +709,7 @@ index 00000000..cc0390c0
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistory.java b/src/main/java/co/aikar/timings/TimingHistory.java
new file mode 100644
index 00000000..ddaed812
index 000000000..ddaed8127
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
@@ -0,0 +0,0 @@
@ -1069,7 +1069,7 @@ index 00000000..ddaed812
+}
diff --git a/src/main/java/co/aikar/timings/TimingHistoryEntry.java b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
new file mode 100644
index 00000000..86d5ac6b
index 000000000..86d5ac6bd
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
@@ -0,0 +0,0 @@
@ -1133,7 +1133,7 @@ index 00000000..86d5ac6b
+}
diff --git a/src/main/java/co/aikar/timings/TimingIdentifier.java b/src/main/java/co/aikar/timings/TimingIdentifier.java
new file mode 100644
index 00000000..df142a89
index 000000000..df142a89b
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
@@ -0,0 +0,0 @@
@ -1255,7 +1255,7 @@ index 00000000..df142a89
+}
diff --git a/src/main/java/co/aikar/timings/Timings.java b/src/main/java/co/aikar/timings/Timings.java
new file mode 100644
index 00000000..0b34e0d0
index 000000000..0b34e0d01
--- /dev/null
+++ b/src/main/java/co/aikar/timings/Timings.java
@@ -0,0 +0,0 @@
@ -1554,7 +1554,7 @@ index 00000000..0b34e0d0
+}
diff --git a/src/main/java/co/aikar/timings/TimingsCommand.java b/src/main/java/co/aikar/timings/TimingsCommand.java
new file mode 100644
index 00000000..c0d8f201
index 000000000..c0d8f2016
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
@@ -0,0 +0,0 @@
@ -1682,7 +1682,7 @@ index 00000000..c0d8f201
+}
diff --git a/src/main/java/co/aikar/timings/TimingsExport.java b/src/main/java/co/aikar/timings/TimingsExport.java
new file mode 100644
index 00000000..ea8734c4
index 000000000..5923adfe6
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
@@ -0,0 +0,0 @@
@ -1872,7 +1872,7 @@ index 00000000..ea8734c4
+ pair("handlers", handlers),
+ pair("worlds", toObjectMapper(TimingHistory.worldMap.entrySet(), input -> pair(input.getValue(), input.getKey()))),
+ pair("tileentity",
+ toObjectMapper(tileEntityTypeSet, input -> pair(input.getId(), input.name()))),
+ toObjectMapper(tileEntityTypeSet, input -> pair(input.ordinal(), input.name()))),
+ pair("entity",
+ toObjectMapper(entityTypeSet, input -> pair(input.getTypeId(), input.name())))
+ ));
@ -2043,7 +2043,7 @@ index 00000000..ea8734c4
+}
diff --git a/src/main/java/co/aikar/timings/TimingsManager.java b/src/main/java/co/aikar/timings/TimingsManager.java
new file mode 100644
index 00000000..ef824d70
index 000000000..ef824d701
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
@@ -0,0 +0,0 @@
@ -2237,7 +2237,7 @@ index 00000000..ef824d70
+}
diff --git a/src/main/java/co/aikar/timings/TimingsReportListener.java b/src/main/java/co/aikar/timings/TimingsReportListener.java
new file mode 100644
index 00000000..bf3e059f
index 000000000..bf3e059fe
--- /dev/null
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
@@ -0,0 +0,0 @@
@ -2318,7 +2318,7 @@ index 00000000..bf3e059f
+}
diff --git a/src/main/java/co/aikar/timings/UnsafeTimingHandler.java b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
new file mode 100644
index 00000000..632c4961
index 000000000..632c49615
--- /dev/null
+++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
@@ -0,0 +0,0 @@
@ -2377,7 +2377,7 @@ index 00000000..632c4961
+}
diff --git a/src/main/java/co/aikar/util/Counter.java b/src/main/java/co/aikar/util/Counter.java
new file mode 100644
index 00000000..80155072
index 000000000..80155072d
--- /dev/null
+++ b/src/main/java/co/aikar/util/Counter.java
@@ -0,0 +0,0 @@
@ -2421,7 +2421,7 @@ index 00000000..80155072
+}
diff --git a/src/main/java/co/aikar/util/JSONUtil.java b/src/main/java/co/aikar/util/JSONUtil.java
new file mode 100644
index 00000000..190bf059
index 000000000..190bf0598
--- /dev/null
+++ b/src/main/java/co/aikar/util/JSONUtil.java
@@ -0,0 +0,0 @@
@ -2567,7 +2567,7 @@ index 00000000..190bf059
+}
diff --git a/src/main/java/co/aikar/util/LoadingIntMap.java b/src/main/java/co/aikar/util/LoadingIntMap.java
new file mode 100644
index 00000000..63a899c7
index 000000000..63a899c7d
--- /dev/null
+++ b/src/main/java/co/aikar/util/LoadingIntMap.java
@@ -0,0 +0,0 @@
@ -2649,7 +2649,7 @@ index 00000000..63a899c7
+}
diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java
new file mode 100644
index 00000000..aedbb033
index 000000000..aedbb0332
--- /dev/null
+++ b/src/main/java/co/aikar/util/LoadingMap.java
@@ -0,0 +0,0 @@
@ -3023,7 +3023,7 @@ index 00000000..aedbb033
+}
diff --git a/src/main/java/co/aikar/util/MRUMapCache.java b/src/main/java/co/aikar/util/MRUMapCache.java
new file mode 100644
index 00000000..5989ee21
index 000000000..5989ee212
--- /dev/null
+++ b/src/main/java/co/aikar/util/MRUMapCache.java
@@ -0,0 +0,0 @@
@ -3139,7 +3139,7 @@ index 00000000..5989ee21
+ }
+}
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
index 1c1f650d..8f46899f 100644
index 1c1f650d8..8f46899fd 100644
--- a/src/main/java/org/bukkit/Bukkit.java
+++ b/src/main/java/org/bukkit/Bukkit.java
@@ -0,0 +0,0 @@ public final class Bukkit {
@ -3151,7 +3151,7 @@ index 1c1f650d..8f46899f 100644
/**
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
index 2a55a954..0f9e5ba7 100644
index 2a55a9548..0f9e5ba72 100644
--- a/src/main/java/org/bukkit/Server.java
+++ b/src/main/java/org/bukkit/Server.java
@@ -0,0 +0,0 @@ public interface Server extends PluginMessageRecipient {
@ -3182,7 +3182,7 @@ index 2a55a954..0f9e5ba7 100644
* Sends the component to the player
*
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index 247d194f..72c5501e 100644
index 247d194f8..72c5501e8 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -0,0 +0,0 @@ public interface UnsafeValues {
@ -3200,7 +3200,7 @@ index 247d194f..72c5501e 100644
}
diff --git a/src/main/java/org/bukkit/command/BufferedCommandSender.java b/src/main/java/org/bukkit/command/BufferedCommandSender.java
new file mode 100644
index 00000000..f9a00aec
index 000000000..f9a00aecc
--- /dev/null
+++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java
@@ -0,0 +0,0 @@
@ -3226,7 +3226,7 @@ index 00000000..f9a00aec
+ }
+}
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
index 4bfc2146..03bdc162 100644
index 4bfc21468..03bdc1622 100644
--- a/src/main/java/org/bukkit/command/Command.java
+++ b/src/main/java/org/bukkit/command/Command.java
@@ -0,0 +0,0 @@ public abstract class Command {
@ -3256,7 +3256,7 @@ index 4bfc2146..03bdc162 100644
return true;
}
diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
index d6c8938b..a6ad94ef 100644
index d6c8938b1..a6ad94ef9 100644
--- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java
+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
@@ -0,0 +0,0 @@ public class FormattedCommandAlias extends Command {
@ -3280,7 +3280,7 @@ index d6c8938b..a6ad94ef 100644
}
diff --git a/src/main/java/org/bukkit/command/MessageCommandSender.java b/src/main/java/org/bukkit/command/MessageCommandSender.java
new file mode 100644
index 00000000..ca1893e9
index 000000000..ca1893e9f
--- /dev/null
+++ b/src/main/java/org/bukkit/command/MessageCommandSender.java
@@ -0,0 +0,0 @@
@ -3399,7 +3399,7 @@ index 00000000..ca1893e9
+
+}
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
index 81e4fa57..f020cb04 100644
index 81e4fa573..f020cb04e 100644
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
@@ -0,0 +0,0 @@ import org.bukkit.command.defaults.BukkitCommand;
@ -3456,7 +3456,7 @@ index 81e4fa57..f020cb04 100644
diff --git a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java b/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
deleted file mode 100644
index 6023e4f6..00000000
index 6023e4f61..000000000
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
+++ /dev/null
@@ -0,0 +0,0 @@
@ -3714,7 +3714,7 @@ index 6023e4f6..00000000
- // Spigot end
-}
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
index 06762a69..4f8ae7a8 100644
index 06762a696..4f8ae7a83 100644
--- a/src/main/java/org/bukkit/entity/Player.java
+++ b/src/main/java/org/bukkit/entity/Player.java
@@ -0,0 +0,0 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
@ -3730,7 +3730,7 @@ index 06762a69..4f8ae7a8 100644
@NotNull
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
index f648c598..78a2d2f8 100644
index f648c5989..78a2d2f8d 100644
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
@@ -0,0 +0,0 @@ public final class SimplePluginManager implements PluginManager {
@ -3787,7 +3787,7 @@ index f648c598..78a2d2f8 100644
}
}
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
index 1173e433..82e379d1 100644
index 1173e433a..82e379d16 100644
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
@@ -0,0 +0,0 @@ public final class JavaPluginLoader implements PluginLoader {
@ -3830,7 +3830,7 @@ index 1173e433..82e379d1 100644
eventSet.add(new TimedRegisteredListener(listener, executor, eh.priority(), plugin, eh.ignoreCancelled()));
} else {
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 0ffc1dfd..b859796b 100644
index 0ffc1dfdb..b859796b4 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -0,0 +0,0 @@ import org.jetbrains.annotations.Nullable;
@ -3844,7 +3844,7 @@ index 0ffc1dfd..b859796b 100644
private final Map<String, Class<?>> classes = new ConcurrentHashMap<String, Class<?>>();
private final PluginDescriptionFile description;
diff --git a/src/main/java/org/bukkit/util/CachedServerIcon.java b/src/main/java/org/bukkit/util/CachedServerIcon.java
index 5ca863b3..612958a3 100644
index 5ca863b36..612958a33 100644
--- a/src/main/java/org/bukkit/util/CachedServerIcon.java
+++ b/src/main/java/org/bukkit/util/CachedServerIcon.java
@@ -0,0 +0,0 @@ package org.bukkit.util;
@ -3867,7 +3867,7 @@ index 5ca863b3..612958a3 100644
+
+}
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
index 6a8f7f55..3cbe5c2b 100644
index 6a8f7f551..3cbe5c2bb 100644
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -0,0 +0,0 @@