--- jsr166/src/test/tck/ExecutorsTest.java 2020/02/01 18:52:17 1.54 +++ jsr166/src/test/tck/ExecutorsTest.java 2021/01/26 13:33:06 1.55 @@ -206,7 +206,7 @@ public class ExecutorsTest extends JSR16 await(proceed); }}; long startTime = System.nanoTime(); - Future f = p.schedule(Executors.callable(task, Boolean.TRUE), + Future f = p.schedule(Executors.callable(task, Boolean.TRUE), timeoutMillis(), MILLISECONDS); assertFalse(f.isDone()); proceed.countDown(); @@ -230,7 +230,7 @@ public class ExecutorsTest extends JSR16 await(proceed); }}; long startTime = System.nanoTime(); - Future f = p.schedule(Executors.callable(task, Boolean.TRUE), + Future f = p.schedule(Executors.callable(task, Boolean.TRUE), timeoutMillis(), MILLISECONDS); assertFalse(f.isDone()); proceed.countDown(); @@ -256,7 +256,7 @@ public class ExecutorsTest extends JSR16 await(proceed); }}; long startTime = System.nanoTime(); - Future f = p.schedule(Executors.callable(task, Boolean.TRUE), + Future f = p.schedule(Executors.callable(task, Boolean.TRUE), timeoutMillis(), MILLISECONDS); assertFalse(f.isDone()); proceed.countDown(); @@ -290,7 +290,7 @@ public class ExecutorsTest extends JSR16 for (final ExecutorService executor : executors) { threads.add(newStartedThread(new CheckedRunnable() { public void realRun() { - Future future = executor.submit(sleeper); + Future future = executor.submit(sleeper); assertFutureTimesOut(future); }})); } @@ -442,7 +442,7 @@ public class ExecutorsTest extends JSR16 public void realRun() throws Exception { if (System.getSecurityManager() == null) return; - Callable task = Executors.privilegedCallable(new CheckCCL()); + Callable task = Executors.privilegedCallable(new CheckCCL()); try { task.call(); shouldThrow(); @@ -521,7 +521,7 @@ public class ExecutorsTest extends JSR16 * callable(Runnable) returns null when called */ public void testCallable1() throws Exception { - Callable c = Executors.callable(new NoOpRunnable()); + Callable c = Executors.callable(new NoOpRunnable()); assertNull(c.call()); } @@ -529,7 +529,7 @@ public class ExecutorsTest extends JSR16 * callable(Runnable, result) returns result when called */ public void testCallable2() throws Exception { - Callable c = Executors.callable(new NoOpRunnable(), one); + Callable c = Executors.callable(new NoOpRunnable(), one); assertSame(one, c.call()); } @@ -537,7 +537,7 @@ public class ExecutorsTest extends JSR16 * callable(PrivilegedAction) returns its result when called */ public void testCallable3() throws Exception { - Callable c = Executors.callable(new PrivilegedAction() { + Callable c = Executors.callable(new PrivilegedAction() { public Object run() { return one; }}); assertSame(one, c.call()); } @@ -546,7 +546,7 @@ public class ExecutorsTest extends JSR16 * callable(PrivilegedExceptionAction) returns its result when called */ public void testCallable4() throws Exception { - Callable c = Executors.callable(new PrivilegedExceptionAction() { + Callable c = Executors.callable(new PrivilegedExceptionAction() { public Object run() { return one; }}); assertSame(one, c.call()); } @@ -556,7 +556,7 @@ public class ExecutorsTest extends JSR16 */ public void testCallableNPE1() { try { - Callable unused = Executors.callable((Runnable) null); + Callable unused = Executors.callable((Runnable) null); shouldThrow(); } catch (NullPointerException success) {} } @@ -566,7 +566,7 @@ public class ExecutorsTest extends JSR16 */ public void testCallableNPE2() { try { - Callable unused = Executors.callable((Runnable) null, one); + Callable unused = Executors.callable((Runnable) null, one); shouldThrow(); } catch (NullPointerException success) {} } @@ -576,7 +576,7 @@ public class ExecutorsTest extends JSR16 */ public void testCallableNPE3() { try { - Callable unused = Executors.callable((PrivilegedAction) null); + Callable unused = Executors.callable((PrivilegedAction) null); shouldThrow(); } catch (NullPointerException success) {} } @@ -586,7 +586,7 @@ public class ExecutorsTest extends JSR16 */ public void testCallableNPE4() { try { - Callable unused = Executors.callable((PrivilegedExceptionAction) null); + Callable unused = Executors.callable((PrivilegedExceptionAction) null); shouldThrow(); } catch (NullPointerException success) {} }