geforkt von Mirrors/Paper
Don't NPE on exporting config with null values (Fixes #2973)
Dieser Commit ist enthalten in:
Ursprung
7434b6d710
Commit
49503ef043
@ -1,4 +1,4 @@
|
||||
From a8ffb9f5823bbfe973233e2f4c4e5f45cb4ea5cc Mon Sep 17 00:00:00 2001
|
||||
From 338c6106a61ac84d108916a674b637d4731b29b2 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Mon, 29 Feb 2016 18:48:17 -0600
|
||||
Subject: [PATCH] Timings v2
|
||||
@ -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 000000000..64531fcce
|
||||
index 00000000..64531fcc
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/FullServerTickHandler.java
|
||||
@@ -0,0 +1,84 @@
|
||||
@ -96,7 +96,7 @@ index 000000000..64531fcce
|
||||
+}
|
||||
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 000000000..9b45ce887
|
||||
index 00000000..9b45ce88
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/NullTimingHandler.java
|
||||
@@ -0,0 +1,68 @@
|
||||
@ -170,7 +170,7 @@ index 000000000..9b45ce887
|
||||
+}
|
||||
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 000000000..933ecf9bd
|
||||
index 00000000..933ecf9b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimedEventExecutor.java
|
||||
@@ -0,0 +1,83 @@
|
||||
@ -259,7 +259,7 @@ index 000000000..933ecf9bd
|
||||
+}
|
||||
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 000000000..a21e5ead5
|
||||
index 00000000..a21e5ead
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/Timing.java
|
||||
@@ -0,0 +1,83 @@
|
||||
@ -348,7 +348,7 @@ index 000000000..a21e5ead5
|
||||
+}
|
||||
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 000000000..a5d13a1e4
|
||||
index 00000000..a5d13a1e
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingData.java
|
||||
@@ -0,0 +1,122 @@
|
||||
@ -476,7 +476,7 @@ index 000000000..a5d13a1e4
|
||||
+}
|
||||
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 000000000..cc0390c06
|
||||
index 00000000..cc0390c0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHandler.java
|
||||
@@ -0,0 +1,227 @@
|
||||
@ -709,7 +709,7 @@ index 000000000..cc0390c06
|
||||
+}
|
||||
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 000000000..ddaed8127
|
||||
index 00000000..ddaed812
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHistory.java
|
||||
@@ -0,0 +1,354 @@
|
||||
@ -1069,7 +1069,7 @@ index 000000000..ddaed8127
|
||||
+}
|
||||
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 000000000..86d5ac6bd
|
||||
index 00000000..86d5ac6b
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingHistoryEntry.java
|
||||
@@ -0,0 +1,58 @@
|
||||
@ -1133,7 +1133,7 @@ index 000000000..86d5ac6bd
|
||||
+}
|
||||
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 000000000..df142a89b
|
||||
index 00000000..df142a89
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingIdentifier.java
|
||||
@@ -0,0 +1,116 @@
|
||||
@ -1255,7 +1255,7 @@ index 000000000..df142a89b
|
||||
+}
|
||||
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 000000000..0b34e0d01
|
||||
index 00000000..0b34e0d0
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/Timings.java
|
||||
@@ -0,0 +1,293 @@
|
||||
@ -1554,7 +1554,7 @@ index 000000000..0b34e0d01
|
||||
+}
|
||||
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 000000000..c0d8f2016
|
||||
index 00000000..c0d8f201
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsCommand.java
|
||||
@@ -0,0 +1,122 @@
|
||||
@ -1682,7 +1682,7 @@ index 000000000..c0d8f2016
|
||||
+}
|
||||
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 000000000..23eb8c65c
|
||||
index 00000000..93d5a3f9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsExport.java
|
||||
@@ -0,0 +1,355 @@
|
||||
@ -1956,7 +1956,7 @@ index 000000000..23eb8c65c
|
||||
+ Iterable<Object> v = (Iterable<Object>) val;
|
||||
+ return toArrayMapper(v, input -> valAsJSON(input, parentKey));
|
||||
+ } else {
|
||||
+ return val.toString();
|
||||
+ return String.valueOf(val);
|
||||
+ }
|
||||
+ } else {
|
||||
+ return mapAsJSON((ConfigurationSection) val, parentKey);
|
||||
@ -2043,7 +2043,7 @@ index 000000000..23eb8c65c
|
||||
+}
|
||||
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 000000000..ef824d701
|
||||
index 00000000..ef824d70
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsManager.java
|
||||
@@ -0,0 +1,188 @@
|
||||
@ -2237,7 +2237,7 @@ index 000000000..ef824d701
|
||||
+}
|
||||
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 000000000..bf3e059fe
|
||||
index 00000000..bf3e059f
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/TimingsReportListener.java
|
||||
@@ -0,0 +1,75 @@
|
||||
@ -2318,7 +2318,7 @@ index 000000000..bf3e059fe
|
||||
+}
|
||||
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 000000000..632c49615
|
||||
index 00000000..632c4961
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/timings/UnsafeTimingHandler.java
|
||||
@@ -0,0 +1,53 @@
|
||||
@ -2377,7 +2377,7 @@ index 000000000..632c49615
|
||||
+}
|
||||
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 000000000..80155072d
|
||||
index 00000000..80155072
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/Counter.java
|
||||
@@ -0,0 +1,38 @@
|
||||
@ -2421,7 +2421,7 @@ index 000000000..80155072d
|
||||
+}
|
||||
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 000000000..190bf0598
|
||||
index 00000000..190bf059
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/JSONUtil.java
|
||||
@@ -0,0 +1,140 @@
|
||||
@ -2567,7 +2567,7 @@ index 000000000..190bf0598
|
||||
+}
|
||||
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 000000000..63a899c7d
|
||||
index 00000000..63a899c7
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/LoadingIntMap.java
|
||||
@@ -0,0 +1,76 @@
|
||||
@ -2649,7 +2649,7 @@ index 000000000..63a899c7d
|
||||
+}
|
||||
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 000000000..aedbb0332
|
||||
index 00000000..aedbb033
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/LoadingMap.java
|
||||
@@ -0,0 +1,368 @@
|
||||
@ -3023,7 +3023,7 @@ index 000000000..aedbb0332
|
||||
+}
|
||||
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 000000000..5989ee212
|
||||
index 00000000..5989ee21
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/co/aikar/util/MRUMapCache.java
|
||||
@@ -0,0 +1,111 @@
|
||||
@ -3139,7 +3139,7 @@ index 000000000..5989ee212
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 82bc43aa9..279236a45 100644
|
||||
index 82bc43aa..279236a4 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -574,7 +574,6 @@ public final class Bukkit {
|
||||
@ -3151,7 +3151,7 @@ index 82bc43aa9..279236a45 100644
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 83ce6a86e..d00a289de 100644
|
||||
index 83ce6a86..d00a289d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1260,6 +1260,26 @@ public interface Server extends PluginMessageRecipient {
|
||||
@ -3182,7 +3182,7 @@ index 83ce6a86e..d00a289de 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 247d194f8..72c5501e8 100644
|
||||
index 247d194f..72c5501e 100644
|
||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||
@@ -69,4 +69,12 @@ public interface UnsafeValues {
|
||||
@ -3200,7 +3200,7 @@ index 247d194f8..72c5501e8 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 000000000..f9a00aecc
|
||||
index 00000000..f9a00aec
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/command/BufferedCommandSender.java
|
||||
@@ -0,0 +1,21 @@
|
||||
@ -3226,7 +3226,7 @@ index 000000000..f9a00aecc
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/Command.java b/src/main/java/org/bukkit/command/Command.java
|
||||
index 4bfc21468..03bdc1622 100644
|
||||
index 4bfc2146..03bdc162 100644
|
||||
--- a/src/main/java/org/bukkit/command/Command.java
|
||||
+++ b/src/main/java/org/bukkit/command/Command.java
|
||||
@@ -33,7 +33,8 @@ public abstract class Command {
|
||||
@ -3256,7 +3256,7 @@ index 4bfc21468..03bdc1622 100644
|
||||
return true;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/command/FormattedCommandAlias.java b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
index d6c8938b1..a6ad94ef9 100644
|
||||
index d6c8938b..a6ad94ef 100644
|
||||
--- a/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
+++ b/src/main/java/org/bukkit/command/FormattedCommandAlias.java
|
||||
@@ -9,6 +9,7 @@ public class FormattedCommandAlias extends Command {
|
||||
@ -3280,7 +3280,7 @@ index d6c8938b1..a6ad94ef9 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 000000000..ca1893e9f
|
||||
index 00000000..ca1893e9
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/bukkit/command/MessageCommandSender.java
|
||||
@@ -0,0 +1,114 @@
|
||||
@ -3399,7 +3399,7 @@ index 000000000..ca1893e9f
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/command/SimpleCommandMap.java b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
index 81e4fa573..f020cb04e 100644
|
||||
index 81e4fa57..f020cb04 100644
|
||||
--- a/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
+++ b/src/main/java/org/bukkit/command/SimpleCommandMap.java
|
||||
@@ -15,7 +15,6 @@ import org.bukkit.command.defaults.BukkitCommand;
|
||||
@ -3456,7 +3456,7 @@ index 81e4fa573..f020cb04e 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 2a145d851..000000000
|
||||
index 2a145d85..00000000
|
||||
--- a/src/main/java/org/bukkit/command/defaults/TimingsCommand.java
|
||||
+++ /dev/null
|
||||
@@ -1,250 +0,0 @@
|
||||
@ -3711,7 +3711,7 @@ index 2a145d851..000000000
|
||||
- // Spigot end
|
||||
-}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java
|
||||
index 9b0153f7d..9d82a691a 100644
|
||||
index 9b0153f7..9d82a691 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Player.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Player.java
|
||||
@@ -1573,6 +1573,11 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM
|
||||
@ -3727,7 +3727,7 @@ index 9b0153f7d..9d82a691a 100644
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/plugin/SimplePluginManager.java b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
index 180794eb4..b9ce12ff9 100644
|
||||
index 180794eb..b9ce12ff 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/SimplePluginManager.java
|
||||
@@ -313,7 +313,6 @@ public final class SimplePluginManager implements PluginManager {
|
||||
@ -3784,7 +3784,7 @@ index 180794eb4..b9ce12ff9 100644
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
index df8a5dcbe..50a51394f 100644
|
||||
index df8a5dcb..50a51394 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/JavaPluginLoader.java
|
||||
@@ -53,7 +53,6 @@ public final class JavaPluginLoader implements PluginLoader {
|
||||
@ -3827,7 +3827,7 @@ index df8a5dcbe..50a51394f 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 5830e8b9b..36f542a85 100644
|
||||
index 5830e8b9..36f542a8 100644
|
||||
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
|
||||
@@ -28,7 +28,8 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -3841,7 +3841,7 @@ index 5830e8b9b..36f542a85 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 5ca863b36..612958a33 100644
|
||||
index 5ca863b3..612958a3 100644
|
||||
--- a/src/main/java/org/bukkit/util/CachedServerIcon.java
|
||||
+++ b/src/main/java/org/bukkit/util/CachedServerIcon.java
|
||||
@@ -2,6 +2,7 @@ package org.bukkit.util;
|
||||
@ -3864,7 +3864,7 @@ index 5ca863b36..612958a33 100644
|
||||
+
|
||||
+}
|
||||
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
index 44badfedc..3cbe5c2bb 100644
|
||||
index 44badfed..3cbe5c2b 100644
|
||||
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
|
||||
@@ -1,3 +1,26 @@
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren