--- jsr166/src/test/tck/JSR166TestCase.java 2016/12/09 07:26:04 1.214 +++ jsr166/src/test/tck/JSR166TestCase.java 2017/01/29 20:19:00 1.218 @@ -19,6 +19,7 @@ * @summary JSR-166 tck tests (whitebox tests allowed) * @build * * @modules java.base/java.util.concurrent:open + * java.base/java.lang:open * java.management * @run junit/othervm/timeout=1000 * -Djsr166.testImplementationDetails=true @@ -32,6 +33,9 @@ * -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 * -Djava.util.secureRandomSeed=true * JSR166TestCase + * @run junit/othervm/timeout=1000/policy=tck.policy + * -Djsr166.testImplementationDetails=true + * JSR166TestCase */ import static java.util.concurrent.TimeUnit.MILLISECONDS; @@ -533,6 +537,8 @@ public class JSR166TestCase extends Test "DoubleAdderTest", "ForkJoinPool8Test", "ForkJoinTask8Test", + "LinkedBlockingDeque8Test", + "LinkedBlockingQueue8Test", "LongAccumulatorTest", "LongAdderTest", "SplittableRandomTest", @@ -555,6 +561,7 @@ public class JSR166TestCase extends Test "AtomicReference9Test", "AtomicReferenceArray9Test", "ExecutorCompletionService9Test", + "ForkJoinPool9Test", }; addNamedTestClasses(suite, java9TestClassNames); } @@ -565,7 +572,7 @@ public class JSR166TestCase extends Test /** Returns list of junit-style test method names in given class. */ public static ArrayList testMethodNames(Class testClass) { Method[] methods = testClass.getDeclaredMethods(); - ArrayList names = new ArrayList(methods.length); + ArrayList names = new ArrayList<>(methods.length); for (Method method : methods) { if (method.getName().startsWith("test") && Modifier.isPublic(method.getModifiers()) @@ -671,7 +678,7 @@ public class JSR166TestCase extends Test * The first exception encountered if any threadAssertXXX method fails. */ private final AtomicReference threadFailure - = new AtomicReference(null); + = new AtomicReference<>(null); /** * Records an exception so that it can be rethrown later in the test @@ -1233,7 +1240,7 @@ public class JSR166TestCase extends Test } public void refresh() {} public String toString() { - List ps = new ArrayList(); + List ps = new ArrayList<>(); for (Enumeration e = perms.elements(); e.hasMoreElements();) ps.add(e.nextElement()); return "AdjustablePolicy with permissions " + ps;