3212 |
|
* An ACC to restrict permissions for the factory itself. |
3213 |
|
* The constructed workers have no permissions set. |
3214 |
|
*/ |
3215 |
< |
private static final AccessControlContext innocuousAcc; |
3215 |
> |
private static final AccessControlContext INNOCUOUS_ACC; |
3216 |
|
static { |
3217 |
|
Permissions innocuousPerms = new Permissions(); |
3218 |
|
innocuousPerms.add(modifyThreadPermission); |
3220 |
|
"enableContextClassLoaderOverride")); |
3221 |
|
innocuousPerms.add(new RuntimePermission( |
3222 |
|
"modifyThreadGroup")); |
3223 |
< |
innocuousAcc = new AccessControlContext(new ProtectionDomain[] { |
3223 |
> |
INNOCUOUS_ACC = new AccessControlContext(new ProtectionDomain[] { |
3224 |
|
new ProtectionDomain(null, innocuousPerms) |
3225 |
|
}); |
3226 |
|
} |
3231 |
|
public ForkJoinWorkerThread run() { |
3232 |
|
return new ForkJoinWorkerThread. |
3233 |
|
InnocuousForkJoinWorkerThread(pool); |
3234 |
< |
}}, innocuousAcc); |
3234 |
> |
}}, INNOCUOUS_ACC); |
3235 |
|
} |
3236 |
|
} |
3237 |
|
|