--- jsr166/src/test/loops/MapLoops.java 2009/10/29 23:09:07 1.4 +++ jsr166/src/test/loops/MapLoops.java 2011/12/05 04:08:46 1.8 @@ -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.*; @@ -24,7 +24,7 @@ public class MapLoops { if (args.length > 0) { try { mapClass = Class.forName(args[0]); - } catch(ClassNotFoundException e) { + } catch (ClassNotFoundException e) { throw new RuntimeException("Class " + args[0] + " not found."); } } @@ -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;