--- jsr166/src/test/loops/ConcurrentQueueLoops.java 2009/10/29 23:09:07 1.7 +++ jsr166/src/test/loops/ConcurrentQueueLoops.java 2009/11/03 01:04:02 1.10 @@ -25,7 +25,7 @@ public class ConcurrentQueueLoops { if (args.length > 0) { try { klass = Class.forName(args[0]); - } catch(ClassNotFoundException e) { + } catch (ClassNotFoundException e) { throw new RuntimeException("Class " + args[0] + " not found."); } } @@ -75,7 +75,7 @@ public class ConcurrentQueueLoops { static int compute(int l) { if (l == 0) - return (int)System.nanoTime(); + return (int) System.nanoTime(); int nn = (l >>> 7) & workMask; while (nn-- > 0) l = LoopHelpers.compute6(l); @@ -87,7 +87,7 @@ public class ConcurrentQueueLoops { barrier.await(); long now = System.nanoTime(); long stopTime = now + RUN_TIME_NANOS; - int l = (int)now; + int l = (int) now; int takes = 0; int misses = 0; int lmask = 1; @@ -103,7 +103,7 @@ public class ConcurrentQueueLoops { return Integer.valueOf(takes); } else { for (int i = 0; i < BATCH_SIZE; ++i) { - queue.offer(((l & lmask)== 0)? zero : one); + queue.offer(((l & lmask)== 0) ? zero : one); if ((lmask <<= 1) == 0) lmask = 1; if (i != 0) l = compute(l); } @@ -118,7 +118,7 @@ public class ConcurrentQueueLoops { } static void oneRun(Class klass, int n) throws Exception { - Queue q = (Queue)klass.newInstance(); + Queue q = (Queue) klass.newInstance(); LoopHelpers.BarrierTimer timer = new LoopHelpers.BarrierTimer(); CyclicBarrier barrier = new CyclicBarrier(n + 1, timer); ArrayList> results = new ArrayList>(n);