--- jsr166/src/test/tck/PhaserTest.java 2009/08/05 00:48:28 1.7 +++ jsr166/src/test/tck/PhaserTest.java 2009/11/26 15:42:15 1.9 @@ -41,8 +41,7 @@ public class PhaserTest extends JSR166Te try { new Phaser(-1); shouldThrow(); - } catch (IllegalArgumentException success) { - } + } catch (IllegalArgumentException success) {} } /** @@ -62,8 +61,7 @@ public class PhaserTest extends JSR166Te try { new Phaser(new Phaser(), -1); shouldThrow(); - } catch (IllegalArgumentException success) { - } + } catch (IllegalArgumentException success) {} } /** @@ -100,8 +98,7 @@ public class PhaserTest extends JSR166Te try { phaser.register(); shouldThrow(); - } catch (IllegalStateException success) { - } + } catch (IllegalStateException success) {} } /** @@ -141,8 +138,7 @@ public class PhaserTest extends JSR166Te try { new Phaser().bulkRegister(-1); shouldThrow(); - } catch (IllegalArgumentException success) { - } + } catch (IllegalArgumentException success) {} } /** @@ -163,8 +159,7 @@ public class PhaserTest extends JSR166Te try { new Phaser().bulkRegister(1 << 16); shouldThrow(); - } catch (IllegalStateException success) { - } + } catch (IllegalStateException success) {} } /** @@ -199,7 +194,7 @@ public class PhaserTest extends JSR166Te for (int i = 0; i < 10; i++) phaser.register(); threads.add(newStartedThread(new CheckedRunnable() { - void realRun() throws InterruptedException { + public void realRun() throws InterruptedException { Thread.sleep(SMALL_DELAY_MS); phaser.arriveAndDeregister(); }})); @@ -229,8 +224,7 @@ public class PhaserTest extends JSR166Te Phaser phaser = new Phaser(); phaser.arriveAndDeregister(); shouldThrow(); - } catch (IllegalStateException success) { - } + } catch (IllegalStateException success) {} } /** @@ -301,7 +295,7 @@ public class PhaserTest extends JSR166Te public void testArriveAndDeregister6() throws InterruptedException { final Phaser phaser = new Phaser(2); Thread t = newStartedThread(new CheckedRunnable() { - void realRun() { + public void realRun() { sleepTillInterrupted(SHORT_DELAY_MS); phaser.arrive(); }}); @@ -336,7 +330,7 @@ public class PhaserTest extends JSR166Te phaser.register(); Thread t = newStartedThread(new CheckedRunnable() { - void realRun() throws InterruptedException { + public void realRun() throws InterruptedException { phaser.register(); sleepTillInterrupted(LONG_DELAY_MS); phaser.awaitAdvance(phaser.arrive()); @@ -359,7 +353,7 @@ public class PhaserTest extends JSR166Te List threads = new ArrayList(); for (int i = 0; i < 4; i++) { threads.add(newStartedThread(new CheckedRunnable() { - void realRun() { + public void realRun() { int phase = phaser.arrive(); phaseCount.incrementAndGet(); sleepTillInterrupted(SMALL_DELAY_MS); @@ -382,7 +376,7 @@ public class PhaserTest extends JSR166Te List threads = new ArrayList(); for (int i = 0; i < 8; i++) { threads.add(newStartedThread(new CheckedRunnable() { - void realRun() { + public void realRun() { sleepTillInterrupted(SHORT_DELAY_MS); phaser.arrive(); }})); @@ -405,7 +399,7 @@ public class PhaserTest extends JSR166Te * waits for the second thread's party to arrive */ Thread t1 = newStartedThread(new CheckedRunnable() { - void realRun() { + public void realRun() { sleepTillInterrupted(SMALL_DELAY_MS); int phase = phaser.awaitAdvance(phaser.arrive()); /* @@ -420,7 +414,7 @@ public class PhaserTest extends JSR166Te * should exit peacefully as this one */ Thread t2 = newStartedThread(new CheckedRunnable() { - void realRun() { + public void realRun() { sleepTillInterrupted(MEDIUM_DELAY_MS); int p1 = phaser.arrive(); int phase = phaser.awaitAdvance(p1); @@ -443,8 +437,7 @@ public class PhaserTest extends JSR166Te Phaser phaser = new Phaser(); phaser.arriveAndAwaitAdvance(); shouldThrow(); - } catch (IllegalStateException success) { - } + } catch (IllegalStateException success) {} } /** @@ -453,7 +446,7 @@ public class PhaserTest extends JSR166Te public void testArriveAndAwaitAdvance2() throws InterruptedException { final Phaser phaser = new Phaser(2); Thread th = newStartedThread(new CheckedRunnable() { - void realRun() { + public void realRun() { phaser.arriveAndAwaitAdvance(); }}); @@ -476,7 +469,7 @@ public class PhaserTest extends JSR166Te final List threads = new ArrayList(); for (int i = 0; i < 6; i++) { threads.add(newStartedThread(new CheckedRunnable() { - void realRun() throws InterruptedException { + public void realRun() throws InterruptedException { phaser.register(); sleepTillInterrupted(SHORT_DELAY_MS); arrivingCount.getAndIncrement();