32 |
|
* -Djava.util.concurrent.ForkJoinPool.common.parallelism=1 |
33 |
|
* -Djava.util.secureRandomSeed=true |
34 |
|
* JSR166TestCase |
35 |
+ |
* @run junit/othervm/timeout=1000/policy=tck.policy |
36 |
+ |
* -Djsr166.testImplementationDetails=true |
37 |
+ |
* JSR166TestCase |
38 |
|
*/ |
39 |
|
|
40 |
|
import static java.util.concurrent.TimeUnit.MILLISECONDS; |
570 |
|
/** Returns list of junit-style test method names in given class. */ |
571 |
|
public static ArrayList<String> testMethodNames(Class<?> testClass) { |
572 |
|
Method[] methods = testClass.getDeclaredMethods(); |
573 |
< |
ArrayList<String> names = new ArrayList<String>(methods.length); |
573 |
> |
ArrayList<String> names = new ArrayList<>(methods.length); |
574 |
|
for (Method method : methods) { |
575 |
|
if (method.getName().startsWith("test") |
576 |
|
&& Modifier.isPublic(method.getModifiers()) |
676 |
|
* The first exception encountered if any threadAssertXXX method fails. |
677 |
|
*/ |
678 |
|
private final AtomicReference<Throwable> threadFailure |
679 |
< |
= new AtomicReference<Throwable>(null); |
679 |
> |
= new AtomicReference<>(null); |
680 |
|
|
681 |
|
/** |
682 |
|
* Records an exception so that it can be rethrown later in the test |
1238 |
|
} |
1239 |
|
public void refresh() {} |
1240 |
|
public String toString() { |
1241 |
< |
List<Permission> ps = new ArrayList<Permission>(); |
1241 |
> |
List<Permission> ps = new ArrayList<>(); |
1242 |
|
for (Enumeration<Permission> e = perms.elements(); e.hasMoreElements();) |
1243 |
|
ps.add(e.nextElement()); |
1244 |
|
return "AdjustablePolicy with permissions " + ps; |