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

@ -498,7 +498,9 @@ public class WebAppClassLoader extends URLClassLoader implements ClassVisibility
// Try the parent loader
try
{
parent_class = _parent.loadClass(name);
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))