< prev index next >

src/java.base/share/classes/java/lang/Thread.java

Print this page
rev 49922 : 8202419: Avoid creating Permission constants early
Reviewed-by: TBD

@@ -423,11 +423,12 @@
         /*
          * Do we have the required permissions?
          */
         if (security != null) {
             if (isCCLOverridden(getClass())) {
-                security.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
+                security.checkPermission(
+                        SecurityConstants.SUBCLASS_IMPLEMENTATION_PERMISSION);
             }
         }
 
         g.addUnstarted();
 

@@ -1701,14 +1702,10 @@
             // else terminated so we don't put it in the map
         }
         return m;
     }
 
-
-    private static final RuntimePermission SUBCLASS_IMPLEMENTATION_PERMISSION =
-                    new RuntimePermission("enableContextClassLoaderOverride");
-
     /** cache of subclass security audit results */
     /* Replace with ConcurrentReferenceHashMap when/if it appears in a future
      * release */
     private static class Caches {
         /** cache of subclass security audit results */
< prev index next >