--- jsr166/src/test/loops/CancelledProducerConsumerLoops.java 2009/11/02 23:42:46 1.7 +++ jsr166/src/test/loops/CancelledProducerConsumerLoops.java 2011/04/14 23:16:10 1.12 @@ -1,7 +1,7 @@ /* * Written by Doug Lea with assistance from members of JCP JSR-166 * Expert Group and released to the public domain, as explained at - * http://creativecommons.org/licenses/publicdomain + * http://creativecommons.org/publicdomain/zero/1.0/ */ import java.util.concurrent.*; @@ -32,7 +32,7 @@ public class CancelledProducerConsumerLo Thread.sleep(100); } pool.shutdown(); - } + } static void oneRun(BlockingQueue q, int npairs, int iters) throws Exception { LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer(); @@ -72,7 +72,7 @@ public class CancelledProducerConsumerLo long endTime = System.nanoTime(); long time = endTime - timer.startTime; if (print) { - double secs = (double)(time) / 1000000000.0; + double secs = (double) time / 1000000000.0; System.out.println("\t " + secs + "s run time"); } } @@ -107,11 +107,11 @@ public class CancelledProducerConsumerLo */ } - static abstract class Stage implements Callable { + abstract static class Stage implements Callable { final BlockingQueue queue; final CyclicBarrier barrier; final int iters; - Stage (BlockingQueue q, CyclicBarrier b, int iters) { + Stage(BlockingQueue q, CyclicBarrier b, int iters) { queue = q; barrier = b; this.iters = iters;