aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorShane Freeder <[email protected]>2019-12-15 22:39:25 +0000
committerShane Freeder <[email protected]>2019-12-15 22:45:17 +0000
commit1c384362669bd7636dfa341bcabdf7a523e287c9 (patch)
tree8e5dcb6641b11abea5df7e83f553e081fde14b8d
parent4d2f85630a3319e4b147ffbfd7db66e38e25f18d (diff)
downloadPaper-1c384362669bd7636dfa341bcabdf7a523e287c9.tar.gz
Paper-1c384362669bd7636dfa341bcabdf7a523e287c9.zip
attempt to allow timings to continue with janky plugin classes
-rw-r--r--Spigot-Server-Patches/0009-Timings-v2.patch22
1 files changed, 14 insertions, 8 deletions
diff --git a/Spigot-Server-Patches/0009-Timings-v2.patch b/Spigot-Server-Patches/0009-Timings-v2.patch
index 114dbe343d..50008e119d 100644
--- a/Spigot-Server-Patches/0009-Timings-v2.patch
+++ b/Spigot-Server-Patches/0009-Timings-v2.patch
@@ -1,4 +1,4 @@
-From 4c63953c6c9a33d2b257fc8fcd781e6291181aba Mon Sep 17 00:00:00 2001
+From 4940966a47053eee781a2859090f7b1d6f381b42 Mon Sep 17 00:00:00 2001
From: Aikar <[email protected]>
Date: Thu, 3 Mar 2016 04:00:11 -0600
Subject: [PATCH] Timings v2
@@ -6,10 +6,10 @@ Subject: [PATCH] Timings v2
diff --git a/src/main/java/co/aikar/timings/MinecraftTimings.java b/src/main/java/co/aikar/timings/MinecraftTimings.java
new file mode 100644
-index 000000000..c6818bc86
+index 000000000..69e26a826
--- /dev/null
+++ b/src/main/java/co/aikar/timings/MinecraftTimings.java
-@@ -0,0 +1,135 @@
+@@ -0,0 +1,141 @@
+package co.aikar.timings;
+
+import com.google.common.collect.MapMaker;
@@ -79,10 +79,16 @@ index 000000000..c6818bc86
+ plugin = TimingsManager.getPluginByClassloader(taskClass);
+ }
+
-+ final String taskname = taskNameCache.computeIfAbsent(taskClass, clazz ->
-+ clazz.isAnonymousClass() || clazz.isLocalClass()
-+ ? clazz.getName()
-+ : clazz.getCanonicalName());
++ final String taskname = taskNameCache.computeIfAbsent(taskClass, clazz -> {
++ try {
++ return clazz.isAnonymousClass() || clazz.isLocalClass()
++ ? clazz.getName()
++ : clazz.getCanonicalName();
++ } catch (Throwable ex) {
++ new Exception("Error occurred detecting class name", ex).printStackTrace();
++ return "MangledClassFile";
++ }
++ });
+
+ StringBuilder name = new StringBuilder(64);
+ name.append("Task: ").append(taskname);
@@ -1837,5 +1843,5 @@ index ca7789b5e..442383969 100644
}
}
--
-2.24.0
+2.24.1