aboutsummaryrefslogtreecommitdiffhomepage
path: root/Spigot-Server-Patches/0009-Timings-v2.patch
diff options
context:
space:
mode:
Diffstat (limited to 'Spigot-Server-Patches/0009-Timings-v2.patch')
-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