8198653: ClassLoader::getSystemClassLoader throws InternalError when called after shutdown

Reviewed-by: dholmes
This commit is contained in:
Mandy Chung 2018-02-24 09:41:42 -08:00
parent aa9cf33c1e
commit 3e28c2f71d

@ -1922,7 +1922,7 @@ public abstract class ClassLoader {
case 3:
String msg = "getSystemClassLoader cannot be called during the system class loader instantiation";
throw new IllegalStateException(msg);
case 4:
default:
// system fully initialized
assert VM.isBooted() && scl != null;
SecurityManager sm = System.getSecurityManager();
@ -1930,8 +1930,6 @@ public abstract class ClassLoader {
checkClassLoaderPermission(scl, Reflection.getCallerClass());
}
return scl;
default:
throw new InternalError("should not reach here");
}
}