Merge pull request #3775 from eclipse/jetty-9.4.x-3736-protect-from-bad-classloader
Issue #3736 - Give better exception when using bad classloader impl
This commit is contained in:
commit
070b8f9de1
|
@ -499,6 +499,8 @@ public class WebAppClassLoader extends URLClassLoader implements ClassVisibility
|
||||||
try
|
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 the webapp is allowed to see this class
|
||||||
if (Boolean.TRUE.equals(__loadServerClasses.get()) || !_context.isServerClass(parent_class))
|
if (Boolean.TRUE.equals(__loadServerClasses.get()) || !_context.isServerClass(parent_class))
|
||||||
|
|
Loading…
Reference in New Issue