--- jsr166/src/test/loops/ArraysSort.java 2015/07/30 20:24:10 1.1 +++ jsr166/src/test/loops/ArraysSort.java 2015/08/10 06:36:59 1.3 @@ -36,7 +36,7 @@ class ArraysSort { numbers[i] = Long.valueOf(i); int thr = ((n + 7) >>> 3) / ForkJoinPool.getCommonPoolParallelism(); - THRESHOLD = (thr <= 1 << 13)? 1 << 13 : thr; + THRESHOLD = (thr <= 1 << 13) ? 1 << 13 : thr; System.out.println("Threshold = " + THRESHOLD); @@ -122,9 +122,9 @@ class ArraysSort { static void checkSorted(Long[] a) { int n = a.length; - long x = ((Long)a[0]).longValue(), y; + long x = a[0].longValue(), y; for (int i = 0; i < n - 1; i++) { - if (x > (y = ((Long)a[i+1]).longValue())) + if (x > (y = a[i+1].longValue())) throw new Error("Unsorted at " + i + ": " + x + " / " + y); x = y; } @@ -153,7 +153,7 @@ class ArraysSort { } ThreadLocalRandom rng = ThreadLocalRandom.current(); Long dl = d[l]; - int m = (dl == null)? h : rng.nextInt(l, h); + int m = (dl == null) ? h : rng.nextInt(l, h); for (int i = l; i < m; ++i) d[i] = s[rng.nextInt(n)]; if (dl != null) { @@ -185,9 +185,9 @@ class ArraysSort { } int bound = h < n ? h : n - 1; int i = l; - long x = ((Long)a[i]).longValue(), y; + long x = a[i].longValue(), y; while (i < bound) { - if (x > (y = ((Long)a[++i]).longValue())) + if (x > (y = a[++i].longValue())) throw new Error("Unsorted " + x + " / " + y); x = y; }