1219 |
|
LONG_DELAY_MS, MILLISECONDS, |
1220 |
|
new ArrayBlockingQueue<Runnable>(1)); |
1221 |
|
try { p.shutdown(); } catch (SecurityException ok) { return; } |
1222 |
< |
try { |
1223 |
< |
p.execute(new NoOpRunnable()); |
1224 |
< |
shouldThrow(); |
1225 |
< |
} catch (RejectedExecutionException success) {} |
1226 |
< |
|
1227 |
< |
joinPool(p); |
1222 |
> |
try (PoolCleaner cleaner = cleaner(p)) { |
1223 |
> |
try { |
1224 |
> |
p.execute(new NoOpRunnable()); |
1225 |
> |
shouldThrow(); |
1226 |
> |
} catch (RejectedExecutionException success) {} |
1227 |
> |
} |
1228 |
|
} |
1229 |
|
|
1230 |
|
/** |