# | Line 426 | Line 426 | public class ThreadPoolExecutorTest exte | |
---|---|---|
426 | new ThreadPoolExecutor(1, 1, | |
427 | LONG_DELAY_MS, MILLISECONDS, | |
428 | new ArrayBlockingQueue<Runnable>(10)); | |
429 | < | assertFalse(p.isShutdown()); |
430 | < | try { p.shutdown(); } catch (SecurityException ok) { return; } |
431 | < | assertTrue(p.isShutdown()); |
432 | < | joinPool(p); |
429 | > | try (PoolCleaner cleaner = cleaner(p)) { |
430 | > | assertFalse(p.isShutdown()); |
431 | > | try { p.shutdown(); } catch (SecurityException ok) { return; } |
432 | > | assertTrue(p.isShutdown()); |
433 | > | } |
434 | } | |
435 | ||
436 | /** |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |