8202419: Avoid creating Permission constants early

Reviewed-by: alanb, mullan
This commit is contained in:
Claes Redestad 2018-04-30 16:27:23 +02:00
parent f7afa8ff53
commit 0f478d2cfd
4 changed files with 26 additions and 21 deletions

View file

@ -425,7 +425,8 @@ class Thread implements Runnable {
*/
if (security != null) {
if (isCCLOverridden(getClass())) {
security.checkPermission(SUBCLASS_IMPLEMENTATION_PERMISSION);
security.checkPermission(
SecurityConstants.SUBCLASS_IMPLEMENTATION_PERMISSION);
}
}
@ -1703,10 +1704,6 @@ class Thread implements Runnable {
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 */