--- jsr166/src/test/tck/ForkJoinPool8Test.java 2015/04/25 04:55:30 1.30 +++ jsr166/src/test/tck/ForkJoinPool8Test.java 2015/10/04 07:26:09 1.31 @@ -1489,7 +1489,7 @@ public class ForkJoinPool8Test extends J */ public void testAwaitQuiescence1() throws Exception { final ForkJoinPool p = new ForkJoinPool(); - try { + try (PoolCleaner cleaner = cleaner(p)) { final long startTime = System.nanoTime(); assertTrue(p.isQuiescent()); ForkJoinTask a = new CheckedRecursiveAction() { @@ -1530,8 +1530,6 @@ public class ForkJoinPool8Test extends J assertFalse(p.isShutdown()); assertFalse(p.isTerminating()); assertFalse(p.isTerminated()); - } finally { - joinPool(p); } } @@ -1549,7 +1547,7 @@ public class ForkJoinPool8Test extends J "java.util.concurrent.ForkJoinPool.common.parallelism"))) return; final ForkJoinPool p = new ForkJoinPool(); - try { + try (PoolCleaner cleaner = cleaner(p)) { assertTrue(p.isQuiescent()); final long startTime = System.nanoTime(); ForkJoinTask a = new CheckedRecursiveAction() { @@ -1582,8 +1580,6 @@ public class ForkJoinPool8Test extends J assertFalse(p.isShutdown()); assertFalse(p.isTerminating()); assertFalse(p.isTerminated()); - } finally { - joinPool(p); } }