567 |
|
/** Returns list of junit-style test method names in given class. */ |
568 |
|
public static ArrayList<String> testMethodNames(Class<?> testClass) { |
569 |
|
Method[] methods = testClass.getDeclaredMethods(); |
570 |
< |
ArrayList<String> names = new ArrayList<String>(methods.length); |
570 |
> |
ArrayList<String> names = new ArrayList<>(methods.length); |
571 |
|
for (Method method : methods) { |
572 |
|
if (method.getName().startsWith("test") |
573 |
|
&& Modifier.isPublic(method.getModifiers()) |
673 |
|
* The first exception encountered if any threadAssertXXX method fails. |
674 |
|
*/ |
675 |
|
private final AtomicReference<Throwable> threadFailure |
676 |
< |
= new AtomicReference<Throwable>(null); |
676 |
> |
= new AtomicReference<>(null); |
677 |
|
|
678 |
|
/** |
679 |
|
* Records an exception so that it can be rethrown later in the test |
1235 |
|
} |
1236 |
|
public void refresh() {} |
1237 |
|
public String toString() { |
1238 |
< |
List<Permission> ps = new ArrayList<Permission>(); |
1238 |
> |
List<Permission> ps = new ArrayList<>(); |
1239 |
|
for (Enumeration<Permission> e = perms.elements(); e.hasMoreElements();) |
1240 |
|
ps.add(e.nextElement()); |
1241 |
|
return "AdjustablePolicy with permissions " + ps; |