< prev index next >
test/jdk/java/util/concurrent/tck/ForkJoinPoolTest.java
Print this page
8234131: Miscellaneous changes imported from jsr166 CVS 2021-01
Reviewed-by: martin
*** 373,383 ****
ForkJoinPool p = new ForkJoinPool(1);
try (PoolCleaner cleaner = cleaner(p)) {
p.shutdown();
assertTrue(p.isShutdown());
try {
! ForkJoinTask<Integer> f = p.submit(new FibTask(8));
shouldThrow();
} catch (RejectedExecutionException success) {}
}
}
--- 373,383 ----
ForkJoinPool p = new ForkJoinPool(1);
try (PoolCleaner cleaner = cleaner(p)) {
p.shutdown();
assertTrue(p.isShutdown());
try {
! ForkJoinTask<Integer> unused = p.submit(new FibTask(8));
shouldThrow();
} catch (RejectedExecutionException success) {}
}
}
*** 561,571 ****
*/
public void testExecuteNullRunnable() {
ExecutorService e = new ForkJoinPool(1);
try (PoolCleaner cleaner = cleaner(e)) {
try {
! Future<?> future = e.submit((Runnable) null);
shouldThrow();
} catch (NullPointerException success) {}
}
}
--- 561,571 ----
*/
public void testExecuteNullRunnable() {
ExecutorService e = new ForkJoinPool(1);
try (PoolCleaner cleaner = cleaner(e)) {
try {
! Future<?> unused = e.submit((Runnable) null);
shouldThrow();
} catch (NullPointerException success) {}
}
}
*** 574,584 ****
*/
public void testSubmitNullCallable() {
ExecutorService e = new ForkJoinPool(1);
try (PoolCleaner cleaner = cleaner(e)) {
try {
! Future<String> future = e.submit((Callable) null);
shouldThrow();
} catch (NullPointerException success) {}
}
}
--- 574,584 ----
*/
public void testSubmitNullCallable() {
ExecutorService e = new ForkJoinPool(1);
try (PoolCleaner cleaner = cleaner(e)) {
try {
! Future<String> unused = e.submit((Callable) null);
shouldThrow();
} catch (NullPointerException success) {}
}
}
< prev index next >