Paper/patches/server/0798-Remove-client-side-code-using-deprecated-for-removal.patch
Nassim Jahnke 1cfd363d32
Updated Upstream (Bukkit/CraftBukkit/Spigot)
Upstream has released updates that appear to apply and compile correctly.
This update has not been tested by PaperMC and as with ANY update, please do your own testing

Bukkit Changes:
fc460d1b PR-735: Add Villager#zombify
c8c8331e PR-690: Add method to read ItemStack input
62845f2f SPIGOT-6829: Add per-player world border API

CraftBukkit Changes:
a459f4d4 PR-1033: Add Villager#zombify
d65d1430 PR-975: Add method to read ItemStack input
b5559f8c SPIGOT-6990: Fix setRepairCost(0) in Anvil
6c308e1b SPIGOT-6829: Add per-player world border API

Spigot Changes:
42b61526 SPIGOT-7000: Generation and /locate issues when using custom structure seeds
2022-04-16 10:29:50 +02:00

44 Zeilen
1.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
Date: Fri, 26 Nov 2021 15:09:58 -0800
Subject: [PATCH] Remove client-side code using deprecated for removal
AccessController
Fixes warnings on build
diff --git a/src/main/java/net/minecraft/Util.java b/src/main/java/net/minecraft/Util.java
index d5a4e7d0ba2aff89e9aec64c8545c105926dcab4..e0a77a776533e48a3f8e2165eb77d4765213b79e 100644
--- a/src/main/java/net/minecraft/Util.java
+++ b/src/main/java/net/minecraft/Util.java
@@ -23,7 +23,6 @@ import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.spi.FileSystemProvider;
-import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.time.Duration;
@@ -764,21 +763,7 @@ public class Util {
}
public void openUrl(URL url) {
- try {
- Process process = AccessController.doPrivileged((PrivilegedExceptionAction<Process>)(() -> {
- return Runtime.getRuntime().exec(this.getOpenUrlArguments(url));
- }));
-
- for(String string : IOUtils.readLines(process.getErrorStream())) {
- Util.LOGGER.error(string);
- }
-
- process.getInputStream().close();
- process.getErrorStream().close();
- process.getOutputStream().close();
- } catch (IOException | PrivilegedActionException var5) {
- Util.LOGGER.error("Couldn't open url '{}'", url, var5);
- }
+ throw new IllegalStateException("This method is not useful on dedicated servers."); // Paper
}