From 235aa19c407f548f8f9b75394b5012dc5b861820 Mon Sep 17 00:00:00 2001 From: md_5 Date: Sun, 29 Jul 2018 22:05:16 +1000 Subject: Throw CNFE if we have an error processing plugin classes --- src/main/java/org/bukkit/plugin/java/PluginClassLoader.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java index 5eb42df3..a0fa3191 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -100,7 +100,11 @@ final class PluginClassLoader extends URLClassLoader { throw new ClassNotFoundException(name, ex); } - classBytes = loader.server.getUnsafe().processClass(description, classBytes); + try { + classBytes = loader.server.getUnsafe().processClass(description, classBytes); + } catch (Exception ex) { + throw new ClassNotFoundException(name, ex); + } int dot = name.lastIndexOf('.'); if (dot != -1) { -- cgit v1.2.3