--- jsr166/src/test/loops/IntMapCheck.java 2009/10/29 23:09:07 1.4 +++ jsr166/src/test/loops/IntMapCheck.java 2009/11/03 01:04:02 1.8 @@ -29,7 +29,7 @@ public class IntMapCheck { if (args.length > 0) { try { mapClass = Class.forName(args[0]); - } catch(ClassNotFoundException e) { + } catch (ClassNotFoundException e) { throw new RuntimeException("Class " + args[0] + " not found."); } } @@ -77,7 +77,7 @@ public class IntMapCheck { try { Map m = (Map)cl.newInstance(); return m; - } catch(Exception e) { + } catch (Exception e) { throw new RuntimeException("Can't instantiate " + cl + ": " + e); } } @@ -108,7 +108,7 @@ public class IntMapCheck { timer.start(nm, n * iters); for (int j = 0; j < iters; ++j) { for (int i = 0; i < n; i++) { - if ((Integer)(s.get(i)) != i) ++sum; + if (s.get(i) != i) ++sum; } } timer.finish(); @@ -219,7 +219,7 @@ public class IntMapCheck { int sum = 0; timer.start("Iter Key ", size); for (Iterator it = s.keySet().iterator(); it.hasNext(); ) { - if(it.next() != MISSING) + if (it.next() != MISSING) ++sum; } timer.finish(); @@ -232,7 +232,7 @@ public class IntMapCheck { int sum = 0; timer.start("Iter Value ", size); for (Iterator it = s.values().iterator(); it.hasNext(); ) { - if(it.next() != MISSING) + if (it.next() != MISSING) ++sum; } timer.finish(); @@ -244,7 +244,7 @@ public class IntMapCheck { int sum = 0; timer.start("Iter Entry ", size); for (Iterator it = s.entrySet().iterator(); it.hasNext(); ) { - if(it.next() != MISSING) + if (it.next() != MISSING) ++sum; } timer.finish(); @@ -272,7 +272,7 @@ public class IntMapCheck { reallyAssert (!s.containsKey(k)); while (it.hasNext()) { Map.Entry x = (Map.Entry)(it.next()); - Integer k2 = (Integer)x.getKey(); + Integer k2 = x.getKey(); seen.put(k2, k2); if (k2 != MISSING) ++sum; @@ -348,7 +348,7 @@ public class IntMapCheck { static void entest(Map s, int size) { if (s instanceof Hashtable) { - Hashtable ht = (Hashtable)s; + Hashtable ht = (Hashtable) s; // entest3(ht, size); // entest4(ht, size); entest1(ht, size); @@ -532,7 +532,7 @@ public class IntMapCheck { static void printStats() { for (Iterator it = accum.entrySet().iterator(); it.hasNext(); ) { Map.Entry e = (Map.Entry)(it.next()); - Stats stats = ((Stats)(e.getValue())); + Stats stats = ((Stats) (e.getValue())); long n = stats.number; double t; if (n > 0) @@ -568,7 +568,7 @@ public class IntMapCheck { void finish() { long endTime = System.nanoTime(); long time = endTime - startTime; - double timePerOp = ((double)time)/numOps; + double timePerOp = ((double) time)/numOps; Object st = accum.get(name); if (st == null)