Issue #3736 - Give better exception when using bad classloader impl

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2019-06-12 13:38:45 -05:00
parent fab70bd13c
commit e81fdbd7c7
1 changed files with 3 additions and 1 deletions

View File

@ -499,6 +499,8 @@ public class WebAppClassLoader extends URLClassLoader implements ClassVisibility
try
{
parent_class = _parent.loadClass(name);
if (parent_class == null)
throw new ClassNotFoundException("Bad ClassLoader: returned null for loadClass(" + name + ")");
// If the webapp is allowed to see this class
if (Boolean.TRUE.equals(__loadServerClasses.get()) || !_context.isServerClass(parent_class))