# | Line 274 | Line 274 | public class ThreadPoolExecutorTest exte | |
---|---|---|
274 | new ThreadPoolExecutor(1, 2, | |
275 | LONG_DELAY_MS, MILLISECONDS, | |
276 | new ArrayBlockingQueue<Runnable>(10)); | |
277 | < | try { |
278 | < | p.setThreadFactory(null); |
279 | < | shouldThrow(); |
280 | < | } catch (NullPointerException success) { |
281 | < | } finally { |
282 | < | joinPool(p); |
277 | > | try (PoolCleaner cleaner = cleaner(p)) { |
278 | > | try { |
279 | > | p.setThreadFactory(null); |
280 | > | shouldThrow(); |
281 | > | } catch (NullPointerException success) {} |
282 | } | |
283 | } | |
284 |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |