--- jsr166/src/test/loops/MapLoops.java 2009/11/03 01:04:02 1.6 +++ jsr166/src/test/loops/MapLoops.java 2014/12/18 18:13:06 1.10 @@ -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.*; @@ -58,9 +58,8 @@ public class MapLoops { System.out.print(" ops: " + nops); System.out.println(); - int k = 1; int warmups = 2; - for (int i = 1; i <= maxThreads;) { + for (int k = 1, i = 1; i <= maxThreads;) { Thread.sleep(100); test(i, nkeys, mapClass); if (warmups > 0) @@ -127,7 +126,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 +136,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;