test/java/util/concurrent/ThreadPoolExecutor/ConfigChanges.java
Print this page
@@ -34,13 +34,13 @@
import java.util.concurrent.*;
import java.util.concurrent.atomic.*;
import static java.util.concurrent.TimeUnit.*;
public class ConfigChanges {
- final static ThreadGroup tg = new ThreadGroup("pool");
+ static final ThreadGroup tg = new ThreadGroup("pool");
- final static Random rnd = new Random();
+ static final Random rnd = new Random();
static void report(ThreadPoolExecutor tpe) {
try {
System.out.printf(
"active=%d submitted=%d completed=%d queued=%d sizes=%d/%d/%d%n",
@@ -239,11 +239,11 @@
else fail(x + " not equal to " + y);}
public static void main(String[] args) throws Throwable {
try {realMain(args);} catch (Throwable t) {unexpected(t);}
System.out.printf("%nPassed = %d, failed = %d%n%n", passed, failed);
if (failed > 0) throw new AssertionError("Some tests failed");}
- private static abstract class Fun {abstract void f() throws Throwable;}
+ private abstract static class Fun {abstract void f() throws Throwable;}
static void THROWS(Class<? extends Throwable> k, Fun... fs) {
for (Fun f : fs)
try { f.f(); fail("Expected " + k.getName() + " not thrown"); }
catch (Throwable t) {
if (k.isAssignableFrom(t.getClass())) pass();