summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormd_5 <git@md-5.net>2017-12-30 07:00:16 +1100
committermd_5 <git@md-5.net>2017-12-30 07:00:16 +1100
commit2b5427b390fee05729c8e576be3e1969982f04ad (patch)
treedd29ea7ffbf05865c668b0fa763562508430a20f
parent6d6f0c7fda94ee33f200e7d5eddc64240e7816d4 (diff)
downloadbukkit-2b5427b390fee05729c8e576be3e1969982f04ad.tar
bukkit-2b5427b390fee05729c8e576be3e1969982f04ad.tar.gz
bukkit-2b5427b390fee05729c8e576be3e1969982f04ad.tar.lz
bukkit-2b5427b390fee05729c8e576be3e1969982f04ad.tar.xz
bukkit-2b5427b390fee05729c8e576be3e1969982f04ad.zip
SPIGOT-3723: Delegate PluginClassLoader back to parent
-rw-r--r--src/main/java/org/bukkit/plugin/java/PluginClassLoader.java8
1 files changed, 6 insertions, 2 deletions
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);
}
}