--- a/jdk/test/java/util/concurrent/tck/JSR166TestCase.java Mon Feb 06 22:23:46 2017 +0100
+++ b/jdk/test/java/util/concurrent/tck/JSR166TestCase.java Tue Feb 07 00:38:22 2017 -0800
@@ -46,6 +46,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
@@ -59,6 +60,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;
@@ -584,6 +588,7 @@
"AtomicReference9Test",
"AtomicReferenceArray9Test",
"ExecutorCompletionService9Test",
+ "ForkJoinPool9Test",
};
addNamedTestClasses(suite, java9TestClassNames);
}
@@ -594,7 +599,7 @@
/** Returns list of junit-style test method names in given class. */
public static ArrayList<String> testMethodNames(Class<?> testClass) {
Method[] methods = testClass.getDeclaredMethods();
- ArrayList<String> names = new ArrayList<String>(methods.length);
+ ArrayList<String> names = new ArrayList<>(methods.length);
for (Method method : methods) {
if (method.getName().startsWith("test")
&& Modifier.isPublic(method.getModifiers())
@@ -700,7 +705,7 @@
* The first exception encountered if any threadAssertXXX method fails.
*/
private final AtomicReference<Throwable> threadFailure
- = new AtomicReference<Throwable>(null);
+ = new AtomicReference<>(null);
/**
* Records an exception so that it can be rethrown later in the test
@@ -1262,7 +1267,7 @@
}
public void refresh() {}
public String toString() {
- List<Permission> ps = new ArrayList<Permission>();
+ List<Permission> ps = new ArrayList<>();
for (Enumeration<Permission> e = perms.elements(); e.hasMoreElements();)
ps.add(e.nextElement());
return "AdjustablePolicy with permissions " + ps;