changeset 49072:b5d1fb0701d4

8198653: ClassLoader::getSystemClassLoader throws InternalError when called after shutdown Reviewed-by: dholmes
author mchung
date Sat, 24 Feb 2018 09:41:42 -0800
parents df25d1a5d78a
children 3fbc7f109dad
files src/java.base/share/classes/java/lang/ClassLoader.java
diffstat 1 files changed, 1 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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");
         }
     }