From 2b5427b390fee05729c8e576be3e1969982f04ad Mon Sep 17 00:00:00 2001 From: md_5 Date: Sat, 30 Dec 2017 07:00:16 +1100 Subject: SPIGOT-3723: Delegate PluginClassLoader back to parent --- src/main/java/org/bukkit/plugin/java/PluginClassLoader.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java index 3be56341..9fc6bd77 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java @@ -116,10 +116,14 @@ 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); } } -- cgit v1.2.3