--- jsr166/src/test/tck/ThreadPoolExecutorTest.java 2015/10/04 01:52:43 1.72 +++ jsr166/src/test/tck/ThreadPoolExecutorTest.java 2015/10/04 01:56:51 1.73 @@ -286,14 +286,15 @@ public class ThreadPoolExecutorTest exte * getRejectedExecutionHandler returns handler in constructor if not set */ public void testGetRejectedExecutionHandler() { - final RejectedExecutionHandler h = new NoOpREHandler(); + final RejectedExecutionHandler handler = new NoOpREHandler(); final ThreadPoolExecutor p = new ThreadPoolExecutor(1, 2, LONG_DELAY_MS, MILLISECONDS, new ArrayBlockingQueue(10), - h); - assertSame(h, p.getRejectedExecutionHandler()); - joinPool(p); + handler); + try (PoolCleaner cleaner = cleaner(p)) { + assertSame(handler, p.getRejectedExecutionHandler()); + } } /**