-
Notifications
You must be signed in to change notification settings - Fork 70
/
0006-Fix-compatibility-with-new-Java-versions.patch
42 lines (36 loc) · 2.04 KB
/
0006-Fix-compatibility-with-new-Java-versions.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: hpfxd <[email protected]>
Date: Sat, 30 Oct 2021 04:55:10 -0400
Subject: [PATCH] Fix compatibility with new Java versions.
Changes:
- Removed W3C CSS import from LoadingMap (????)
- Removed Reflection#getCallerClass from CustomTimingsHandler. This could be replaced with a StalkWalker with a multi-release jar, but since the class is deprecated anyways, I think it's fine to just leave it.
diff --git a/src/main/java/co/aikar/util/LoadingMap.java b/src/main/java/co/aikar/util/LoadingMap.java
index a9f2919997db476d1aefe66fcc6fcac8e9f98be2..26d345f533d209951c5fad4ab7cd01063d5e1000 100644
--- a/src/main/java/co/aikar/util/LoadingMap.java
+++ b/src/main/java/co/aikar/util/LoadingMap.java
@@ -27,7 +27,6 @@ package co.aikar.util;
import com.google.common.base.Function;
import org.bukkit.Material;
import co.aikar.timings.TimingHistory;
-import org.w3c.dom.css.Counter;
import java.lang.reflect.Constructor;
import java.util.AbstractMap;
diff --git a/src/main/java/org/spigotmc/CustomTimingsHandler.java b/src/main/java/org/spigotmc/CustomTimingsHandler.java
index 7e89b97b60d547c75bde6d54f1512b0277099034..709b62e07e2a704363a96c699ce61e4bba4700d3 100644
--- a/src/main/java/org/spigotmc/CustomTimingsHandler.java
+++ b/src/main/java/org/spigotmc/CustomTimingsHandler.java
@@ -30,7 +30,6 @@ import co.aikar.timings.NullTimingHandler;
import co.aikar.timings.Timing;
import co.aikar.timings.Timings;
import co.aikar.timings.TimingsManager;
-import sun.reflect.Reflection;
import java.lang.reflect.Method;
import java.util.logging.Level;
@@ -52,7 +51,7 @@ public final class CustomTimingsHandler {
Plugin plugin = null;
try {
- plugin = TimingsManager.getPluginByClassloader(Reflection.getCallerClass(2));
+ //plugin = TimingsManager.getPluginByClassloader(Reflection.getCallerClass(2));
} catch (Exception ignored) {}
new AuthorNagException("Deprecated use of CustomTimingsHandler. Please Switch to Timings.of ASAP").printStackTrace();