--- jsr166/src/test/loops/MapLoops.java 2009/11/02 23:42:46 1.5 +++ jsr166/src/test/loops/MapLoops.java 2013/12/21 22:28:43 1.9 @@ -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.*; @@ -112,9 +112,9 @@ public class MapLoops { barrier.await(); barrier.await(); long time = timer.getTime(); - long tpo = time / (i * (long)nops); + long tpo = time / (i * (long) nops); System.out.print(LoopHelpers.rightJustify(tpo) + " ns per op"); - double secs = (double)(time) / 1000000000.0; + double secs = (double) time / 1000000000.0; System.out.println("\t " + secs + "s run time"); map.clear(); } @@ -127,7 +127,7 @@ public class MapLoops { int position; int total; - Runner(int id, Map map, Integer[] key, CyclicBarrier barrier) { + Runner(int id, Map map, Integer[] key, CyclicBarrier barrier) { this.map = map; this.key = key; this.barrier = barrier; @@ -137,7 +137,7 @@ public class MapLoops { } int step() { - // random-walk around key positions, bunching accesses + // random-walk around key positions, bunching accesses int r = rng.next(); position += (r & 7) - 3; while (position >= key.length) position -= key.length;