Do not fail with NPE if a class is not found in preloader

This commit is contained in:
Andrey Breslav
2013-10-10 18:28:14 +04:00
parent a6b89b8874
commit 41180d78e2
@@ -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;