--- jsr166/src/test/tck/RecursiveActionTest.java 2017/10/21 06:49:04 1.51 +++ jsr166/src/test/tck/RecursiveActionTest.java 2018/05/28 21:49:32 1.54 @@ -99,7 +99,7 @@ public class RecursiveActionTest extends try { assertNull(a.get()); assertNull(a.get(randomTimeout(), randomTimeUnit())); - } catch (Exception fail) { threadUnexpectedException(fail); } + } catch (Throwable fail) { threadUnexpectedException(fail); } } void checkCancelled(RecursiveAction a) { @@ -325,8 +325,7 @@ public class RecursiveActionTest extends * succeeds in the presence of interrupts */ public void testJoinIgnoresInterruptsOutsideForkJoinPool() { - final SynchronousQueue sq = - new SynchronousQueue(); + final SynchronousQueue sq = new SynchronousQueue<>(); RecursiveAction a = new CheckedRecursiveAction() { protected void realCompute() throws InterruptedException { FibAction[] fibActions = new FibAction[6]; @@ -338,8 +337,8 @@ public class RecursiveActionTest extends fibActions[4].cancel(true); fibActions[5].completeExceptionally(new FJException()); - for (int i = 0; i < fibActions.length; i++) - fibActions[i].fork(); + for (FibAction fibAction : fibActions) + fibAction.fork(); sq.put(fibActions);