1305 |
|
new ThreadPoolExecutor(1, 2, |
1306 |
|
LONG_DELAY_MS, MILLISECONDS, |
1307 |
|
new ArrayBlockingQueue<Runnable>(10)); |
1308 |
< |
try { |
1309 |
< |
p.setCorePoolSize(-1); |
1310 |
< |
shouldThrow(); |
1311 |
< |
} catch (IllegalArgumentException success) { |
1312 |
< |
} finally { |
1313 |
< |
try { p.shutdown(); } catch (SecurityException ok) { return; } |
1308 |
> |
try (PoolCleaner cleaner = cleaner(p)) { |
1309 |
> |
try { |
1310 |
> |
p.setCorePoolSize(-1); |
1311 |
> |
shouldThrow(); |
1312 |
> |
} catch (IllegalArgumentException success) {} |
1313 |
|
} |
1315 |
– |
joinPool(p); |
1314 |
|
} |
1315 |
|
|
1316 |
|
/** |