# | Line 321 | Line 321 | public class ThreadPoolExecutorTest exte | |
---|---|---|
321 | new ThreadPoolExecutor(1, 2, | |
322 | LONG_DELAY_MS, MILLISECONDS, | |
323 | new ArrayBlockingQueue<Runnable>(10)); | |
324 | < | try { |
325 | < | p.setRejectedExecutionHandler(null); |
326 | < | shouldThrow(); |
327 | < | } catch (NullPointerException success) { |
328 | < | } finally { |
329 | < | joinPool(p); |
324 | > | try (PoolCleaner cleaner = cleaner(p)) { |
325 | > | try { |
326 | > | p.setRejectedExecutionHandler(null); |
327 | > | shouldThrow(); |
328 | > | } catch (NullPointerException success) {} |
329 | } | |
330 | } | |
331 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |