--- jsr166/src/test/tck/ExecutorsTest.java 2004/01/27 11:37:00 1.16 +++ jsr166/src/test/tck/ExecutorsTest.java 2009/08/04 13:58:09 1.18 @@ -12,6 +12,7 @@ import java.util.*; import java.util.concurrent.*; import java.math.BigInteger; import java.security.*; +import sun.security.util.SecurityConstants; public class ExecutorsTest extends JSR166TestCase{ public static void main(String[] args) { @@ -337,7 +338,7 @@ public class ExecutorsTest extends JSR16 try { Thread current = Thread.currentThread(); threadAssertTrue(!current.isDaemon()); - threadAssertTrue(current.getPriority() == Thread.NORM_PRIORITY); + threadAssertTrue(current.getPriority() <= Thread.NORM_PRIORITY); ThreadGroup g = current.getThreadGroup(); SecurityManager s = System.getSecurityManager(); if (s != null) @@ -392,7 +393,7 @@ public class ExecutorsTest extends JSR16 try { Thread current = Thread.currentThread(); threadAssertTrue(!current.isDaemon()); - threadAssertTrue(current.getPriority() == Thread.NORM_PRIORITY); + threadAssertTrue(current.getPriority() <= Thread.NORM_PRIORITY); ThreadGroup g = current.getThreadGroup(); SecurityManager s = System.getSecurityManager(); if (s != null) @@ -427,7 +428,11 @@ public class ExecutorsTest extends JSR16 } void checkCCL() { - AccessController.getContext().checkPermission(new RuntimePermission("getContextClassLoader")); + SecurityManager sm = System.getSecurityManager(); + if (sm != null) { + sm.checkPermission(new RuntimePermission("setContextClassLoader")); + sm.checkPermission(SecurityConstants.GET_CLASSLOADER_PERMISSION); + } } class CheckCCL implements Callable {