Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
d5f3458c8 Adjust bStats data sending delay (#4914)
de31e8c70 Remove Paper's UnsafeUtils (#4913)
This commit is contained in:
BillyGalbreath
2020-12-21 01:07:19 -06:00
parent 2fd92fe308
commit 43d6dabb27
5 changed files with 7 additions and 65 deletions

View File

@@ -1,58 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: BillyGalbreath <blake.galbreath@gmail.com>
Date: Fri, 18 Dec 2020 20:59:25 -0600
Subject: [PATCH] Remove paper's unsafe util
diff --git a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
index beed9e6e07a9080f1c059e08220839090553d0a4..f79685b48bb581277a6891927988b6f7a4389dc4 100644
--- a/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
+++ b/src/main/java/com/destroystokyo/paper/event/executor/asm/ClassDefiner.java
@@ -1,6 +1,5 @@
package com.destroystokyo.paper.event.executor.asm;
-import com.destroystokyo.paper.utils.UnsafeUtils;
import org.jetbrains.annotations.NotNull;
public interface ClassDefiner {
diff --git a/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java b/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java
deleted file mode 100644
index 72e48e8efdf750d77fc1f9d5fa7dc279e88aa9a7..0000000000000000000000000000000000000000
--- a/src/main/java/com/destroystokyo/paper/utils/UnsafeUtils.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.destroystokyo.paper.utils;
-
-import org.jetbrains.annotations.Nullable;
-import sun.misc.Unsafe;
-
-import java.lang.reflect.Field;
-
-public class UnsafeUtils {
- private UnsafeUtils() {}
-
- private static final Unsafe UNSAFE;
- static {
- Unsafe unsafe;
- try {
- Class c = Class.forName("sun.misc.Unsafe");
- Field f = c.getDeclaredField("theUnsafe");
- f.setAccessible(true);
- unsafe = (Unsafe) f.get(null);
- } catch (ClassNotFoundException | NoSuchFieldException | SecurityException e) {
- unsafe = null;
- } catch (IllegalAccessException e) {
- throw new AssertionError(e);
- }
- UNSAFE = unsafe;
- }
-
- public static boolean isUnsafeSupported() {
- return UNSAFE != null;
- }
-
- @Nullable
- public static Unsafe getUnsafe() {
- return UNSAFE;
- }
-}