diff options
author | md_5 <git@md-5.net> | 2017-12-29 14:06:56 +1100 |
---|---|---|
committer | md_5 <git@md-5.net> | 2017-12-29 14:26:48 +1100 |
commit | 6d6f0c7fda94ee33f200e7d5eddc64240e7816d4 (patch) | |
tree | ba23bc9ea7e7d93312e708c7a7959d9531f47176 | |
parent | 20971610daa5cbe1685ac9ba0fa93525e7158048 (diff) | |
download | bukkit-6d6f0c7fda94ee33f200e7d5eddc64240e7816d4.tar bukkit-6d6f0c7fda94ee33f200e7d5eddc64240e7816d4.tar.gz bukkit-6d6f0c7fda94ee33f200e7d5eddc64240e7816d4.tar.lz bukkit-6d6f0c7fda94ee33f200e7d5eddc64240e7816d4.tar.xz bukkit-6d6f0c7fda94ee33f200e7d5eddc64240e7816d4.zip |
Throw ClassNotFoundException without delegation
-rw-r--r-- | src/main/java/org/bukkit/plugin/java/PluginClassLoader.java | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java index 9fc6bd77..3be56341 100644 --- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java +++ b/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); } } |