ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/ThreadPoolExecutorTest.java
(Generate patch)

Comparing jsr166/src/test/tck/ThreadPoolExecutorTest.java (file contents):
Revision 1.96 by jsr166, Sun Oct 4 06:39:13 2015 UTC vs.
Revision 1.97 by jsr166, Sun Oct 4 06:45:29 2015 UTC

# Line 1305 | Line 1305 | public class ThreadPoolExecutorTest exte
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      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines