Do not fail with NPE if a class is not found in preloader
This commit is contained in:
@@ -78,6 +78,9 @@ public class ClassPreloadingUtils {
|
||||
// Look in this class loader and then in the parent one
|
||||
Class<?> aClass = super.loadClass(name);
|
||||
if (aClass == null) {
|
||||
if (parent == null) {
|
||||
throw new ClassNotFoundException("Class not available in preloader: " + name);
|
||||
}
|
||||
return parent.loadClass(name);
|
||||
}
|
||||
return aClass;
|
||||
|
||||
Reference in New Issue
Block a user