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

Comparing jsr166/src/test/tck/RecursiveActionTest.java (file contents):
Revision 1.50 by jsr166, Mon May 29 19:15:02 2017 UTC vs.
Revision 1.55 by jsr166, Sun Jul 22 21:09:02 2018 UTC

# Line 96 | Line 96 | public class RecursiveActionTest extends
96          assertNull(a.join());
97          assertFalse(a.cancel(false));
98          assertFalse(a.cancel(true));
99 +
100 +        Object v1 = null, v2 = null;
101          try {
102 <            assertNull(a.get());
103 <            assertNull(a.get(randomTimeout(), randomTimeUnit()));
102 >            v1 = a.get();
103 >            v2 = a.get(randomTimeout(), randomTimeUnit());
104          } catch (Throwable fail) { threadUnexpectedException(fail); }
105 +        assertNull(v1);
106 +        assertNull(v2);
107      }
108  
109      void checkCancelled(RecursiveAction a) {
# Line 325 | Line 329 | public class RecursiveActionTest extends
329       * succeeds in the presence of interrupts
330       */
331      public void testJoinIgnoresInterruptsOutsideForkJoinPool() {
332 <        final SynchronousQueue<FibAction[]> sq =
329 <            new SynchronousQueue<FibAction[]>();
332 >        final SynchronousQueue<FibAction[]> sq = new SynchronousQueue<>();
333          RecursiveAction a = new CheckedRecursiveAction() {
334              protected void realCompute() throws InterruptedException {
335                  FibAction[] fibActions = new FibAction[6];
# Line 338 | Line 341 | public class RecursiveActionTest extends
341                  fibActions[4].cancel(true);
342                  fibActions[5].completeExceptionally(new FJException());
343  
344 <                for (int i = 0; i < fibActions.length; i++)
345 <                    fibActions[i].fork();
344 >                for (FibAction fibAction : fibActions)
345 >                    fibAction.fork();
346  
347                  sq.put(fibActions);
348  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines