--- jsr166/src/test/loops/LoopHelpers.java 2009/10/29 23:09:07 1.7 +++ jsr166/src/test/loops/LoopHelpers.java 2010/09/27 19:15:15 1.10 @@ -53,7 +53,7 @@ class LoopHelpers { */ public static int compute3(int x) { int t = (x % 127773) * 16807 - (x / 127773) * 2836; - return (t > 0)? t : t + 0x7fffffff; + return (t > 0) ? t : t + 0x7fffffff; } /** @@ -108,7 +108,7 @@ class LoopHelpers { int x = -1831433054; public XorShift32Random(int seed) { x = seed; } public XorShift32Random() { - this((int)System.nanoTime() + seq.getAndAdd(129)); + this((int) System.nanoTime() + seq.getAndAdd(129)); } public int next() { x ^= x << 6; @@ -128,7 +128,7 @@ class LoopHelpers { int w = 273326509; public MarsagliaRandom(int seed) { x = seed; } public MarsagliaRandom() { - this((int)System.nanoTime() + seq.getAndAdd(129)); + this((int) System.nanoTime() + seq.getAndAdd(129)); } public int next() { int t = x ^ (x << 11); @@ -143,9 +143,9 @@ class LoopHelpers { * Unsynchronized version of java.util.Random algorithm. */ public static final class SimpleRandom { - private final static long multiplier = 0x5DEECE66DL; - private final static long addend = 0xBL; - private final static long mask = (1L << 48) - 1; + private static final long multiplier = 0x5DEECE66DL; + private static final long addend = 0xBL; + private static final long mask = (1L << 48) - 1; static final AtomicLong seq = new AtomicLong( -715159705); private long seed; @@ -164,7 +164,7 @@ class LoopHelpers { public int next() { long nextseed = (seed * multiplier + addend) & mask; seed = nextseed; - return ((int)(nextseed >>> 17)) & 0x7FFFFFFF; + return ((int) (nextseed >>> 17)) & 0x7FFFFFFF; } }