--- jsr166/src/test/tck/RecursiveActionTest.java 2015/10/18 04:48:32 1.46 +++ jsr166/src/test/tck/RecursiveActionTest.java 2016/08/16 23:02:57 1.47 @@ -258,12 +258,12 @@ public class RecursiveActionTest extends RecursiveAction a = new CheckedRecursiveAction() { protected void realCompute() { FibAction f = new FibAction(8); - final Thread myself = Thread.currentThread(); + final Thread currentThread = Thread.currentThread(); // test join() assertSame(f, f.fork()); - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); assertNull(f.join()); Thread.interrupted(); assertEquals(21, f.result); @@ -272,8 +272,8 @@ public class RecursiveActionTest extends f = new FibAction(8); f.cancel(true); assertSame(f, f.fork()); - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); try { f.join(); shouldThrow(); @@ -285,8 +285,8 @@ public class RecursiveActionTest extends f = new FibAction(8); f.completeExceptionally(new FJException()); assertSame(f, f.fork()); - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); try { f.join(); shouldThrow(); @@ -298,8 +298,8 @@ public class RecursiveActionTest extends // test quietlyJoin() f = new FibAction(8); assertSame(f, f.fork()); - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); f.quietlyJoin(); Thread.interrupted(); assertEquals(21, f.result); @@ -308,8 +308,8 @@ public class RecursiveActionTest extends f = new FibAction(8); f.cancel(true); assertSame(f, f.fork()); - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); f.quietlyJoin(); Thread.interrupted(); checkCancelled(f); @@ -317,8 +317,8 @@ public class RecursiveActionTest extends f = new FibAction(8); f.completeExceptionally(new FJException()); assertSame(f, f.fork()); - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); f.quietlyJoin(); Thread.interrupted(); checkCompletedAbnormally(f, f.getException()); @@ -358,22 +358,22 @@ public class RecursiveActionTest extends public void realRun() throws InterruptedException { FibAction[] fibActions = sq.take(); FibAction f; - final Thread myself = Thread.currentThread(); + final Thread currentThread = Thread.currentThread(); // test join() ------------ f = fibActions[0]; assertFalse(ForkJoinTask.inForkJoinPool()); - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); assertNull(f.join()); assertTrue(Thread.interrupted()); assertEquals(21, f.result); checkCompletedNormally(f); f = fibActions[1]; - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); try { f.join(); shouldThrow(); @@ -383,8 +383,8 @@ public class RecursiveActionTest extends } f = fibActions[2]; - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); try { f.join(); shouldThrow(); @@ -396,23 +396,23 @@ public class RecursiveActionTest extends // test quietlyJoin() --------- f = fibActions[3]; - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); f.quietlyJoin(); assertTrue(Thread.interrupted()); assertEquals(21, f.result); checkCompletedNormally(f); f = fibActions[4]; - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); f.quietlyJoin(); assertTrue(Thread.interrupted()); checkCancelled(f); f = fibActions[5]; - myself.interrupt(); - assertTrue(myself.isInterrupted()); + currentThread.interrupt(); + assertTrue(currentThread.isInterrupted()); f.quietlyJoin(); assertTrue(Thread.interrupted()); assertTrue(f.getException() instanceof FJException);