From 00678ff63c5c18da89790a4c8f53d5c5f55df5ed Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 30 Jul 2018 09:18:55 +1000 Subject: Include class path in legacy conversion errors. --- src/main/java/org/bukkit/UnsafeValues.java | 2 +- src/main/java/org/bukkit/plugin/java/PluginClassLoader.java | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java index 20b3a9ee..f1188b05 100644 --- a/src/main/java/org/bukkit/UnsafeValues.java +++ b/src/main/java/org/bukkit/UnsafeValues.java @@ -31,7 +31,7 @@ public interface UnsafeValues { void checkSupported(PluginDescriptionFile pdf); - byte[] processClass(PluginDescriptionFile pdf, byte[] clazz); + byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz); /** * Load an advancement represented by the specified string into the server. diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java index a0fa3191..154481af 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -100,11 +100,7 @@ final class PluginClassLoader extends URLClassLoader { throw new ClassNotFoundException(name, ex); } - try { - classBytes = loader.server.getUnsafe().processClass(description, classBytes); - } catch (Exception ex) { - throw new ClassNotFoundException(name, ex); - } + classBytes = loader.server.getUnsafe().processClass(description, path, classBytes); int dot = name.lastIndexOf('.'); if (dot != -1) { -- cgit v1.2.3