From 6c92a5d11188853a0d1cf6799fccf477cd6603c1 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Fri, 29 Dec 2017 14:06:56 +1100 Subject: [PATCH] Throw ClassNotFoundException without delegation By: md_5 --- .../java/org/bukkit/plugin/java/PluginClassLoader.java | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/paper-api/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java index 9fc6bd7721..3be5634123 100644 --- a/paper-api/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/paper-api/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -116,14 +116,10 @@ final class PluginClassLoader extends URLClassLoader { CodeSource source = new CodeSource(url, signers); result = defineClass(name, classBytes, 0, classBytes.length, source); - } - if (result == null) { - result = super.findClass(name); - } - - if (result != null) { loader.setClass(name, result); + } else { + throw new ClassNotFoundException(name); } }