Prepare for 1.19 dev
This commit is contained in:
parent
276d830d22
commit
cb05aa6b8b
1302 changed files with 131 additions and 72 deletions
|
@ -1,28 +0,0 @@
|
|||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
Date: Sat, 23 Feb 2019 11:26:21 -0500
|
||||
Subject: [PATCH] Paper Utils
|
||||
|
||||
|
||||
diff --git a/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java b/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9db0056ab94145819628b3ad8d8d26130d117fcf
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/com/destroystokyo/paper/util/SneakyThrow.java
|
||||
@@ -0,0 +1,16 @@
|
||||
+package com.destroystokyo.paper.util;
|
||||
+
|
||||
+import org.jetbrains.annotations.NotNull;
|
||||
+
|
||||
+public class SneakyThrow {
|
||||
+
|
||||
+ public static void sneaky(@NotNull Throwable exception) {
|
||||
+ SneakyThrow.<RuntimeException>throwSneaky(exception);
|
||||
+ }
|
||||
+
|
||||
+ @SuppressWarnings("unchecked")
|
||||
+ private static <T extends Throwable> void throwSneaky(@NotNull Throwable exception) throws T {
|
||||
+ throw (T) exception;
|
||||
+ }
|
||||
+
|
||||
+}
|
Loading…
Add table
Add a link
Reference in a new issue