8198653: ClassLoader::getSystemClassLoader throws InternalError when called after shutdown
Reviewed-by: dholmes
--- a/src/java.base/share/classes/java/lang/ClassLoader.java Mon Feb 19 04:50:50 2018 +0100
+++ b/src/java.base/share/classes/java/lang/ClassLoader.java Sat Feb 24 09:41:42 2018 -0800
@@ -1922,7 +1922,7 @@
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 @@
checkClassLoaderPermission(scl, Reflection.getCallerClass());
}
return scl;
- default:
- throw new InternalError("should not reach here");
}
}