12 |
|
import java.util.concurrent.*; |
13 |
|
import java.math.BigInteger; |
14 |
|
import java.security.*; |
15 |
+ |
import sun.security.util.SecurityConstants; |
16 |
|
|
17 |
|
public class ExecutorsTest extends JSR166TestCase{ |
18 |
|
public static void main(String[] args) { |
428 |
|
} |
429 |
|
|
430 |
|
void checkCCL() { |
431 |
< |
AccessController.getContext().checkPermission(new RuntimePermission("getContextClassLoader")); |
431 |
> |
SecurityManager sm = System.getSecurityManager(); |
432 |
> |
if (sm != null) { |
433 |
> |
sm.checkPermission(new RuntimePermission("setContextClassLoader")); |
434 |
> |
sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION); |
435 |
> |
} |
436 |
|
} |
437 |
|
|
438 |
|
class CheckCCL implements Callable<Object> { |