Throw ClassNotFoundException without delegation

This commit is contained in:
md_5 2017-12-29 14:06:56 +11:00
parent 20971610da
commit 6d6f0c7fda

View file

@ -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);
}
}