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

Comparing jsr166/src/test/tck/ForkJoinPool8Test.java (file contents):
Revision 1.32 by jsr166, Tue Oct 13 21:07:54 2015 UTC vs.
Revision 1.33 by jsr166, Tue Aug 16 23:02:57 2016 UTC

# Line 269 | Line 269 | public class ForkJoinPool8Test extends J
269          RecursiveAction a = new CheckedRecursiveAction() {
270              protected void realCompute() {
271                  FibAction f = new FibAction(8);
272 <                final Thread myself = Thread.currentThread();
272 >                final Thread currentThread = Thread.currentThread();
273  
274                  // test join()
275                  assertSame(f, f.fork());
276 <                myself.interrupt();
277 <                assertTrue(myself.isInterrupted());
276 >                currentThread.interrupt();
277 >                assertTrue(currentThread.isInterrupted());
278                  assertNull(f.join());
279                  Thread.interrupted();
280                  assertEquals(21, f.result);
# Line 283 | Line 283 | public class ForkJoinPool8Test extends J
283                  f = new FibAction(8);
284                  f.cancel(true);
285                  assertSame(f, f.fork());
286 <                myself.interrupt();
287 <                assertTrue(myself.isInterrupted());
286 >                currentThread.interrupt();
287 >                assertTrue(currentThread.isInterrupted());
288                  try {
289                      f.join();
290                      shouldThrow();
# Line 296 | Line 296 | public class ForkJoinPool8Test extends J
296                  f = new FibAction(8);
297                  f.completeExceptionally(new FJException());
298                  assertSame(f, f.fork());
299 <                myself.interrupt();
300 <                assertTrue(myself.isInterrupted());
299 >                currentThread.interrupt();
300 >                assertTrue(currentThread.isInterrupted());
301                  try {
302                      f.join();
303                      shouldThrow();
# Line 309 | Line 309 | public class ForkJoinPool8Test extends J
309                  // test quietlyJoin()
310                  f = new FibAction(8);
311                  assertSame(f, f.fork());
312 <                myself.interrupt();
313 <                assertTrue(myself.isInterrupted());
312 >                currentThread.interrupt();
313 >                assertTrue(currentThread.isInterrupted());
314                  f.quietlyJoin();
315                  Thread.interrupted();
316                  assertEquals(21, f.result);
# Line 319 | Line 319 | public class ForkJoinPool8Test extends J
319                  f = new FibAction(8);
320                  f.cancel(true);
321                  assertSame(f, f.fork());
322 <                myself.interrupt();
323 <                assertTrue(myself.isInterrupted());
322 >                currentThread.interrupt();
323 >                assertTrue(currentThread.isInterrupted());
324                  f.quietlyJoin();
325                  Thread.interrupted();
326                  checkCancelled(f);
# Line 328 | Line 328 | public class ForkJoinPool8Test extends J
328                  f = new FibAction(8);
329                  f.completeExceptionally(new FJException());
330                  assertSame(f, f.fork());
331 <                myself.interrupt();
332 <                assertTrue(myself.isInterrupted());
331 >                currentThread.interrupt();
332 >                assertTrue(currentThread.isInterrupted());
333                  f.quietlyJoin();
334                  Thread.interrupted();
335                  checkCompletedAbnormally(f, f.getException());

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines