--- jsr166/src/jsr166e/ForkJoinPool.java 2012/10/30 14:23:03 1.9 +++ jsr166/src/jsr166e/ForkJoinPool.java 2012/10/30 16:05:35 1.10 @@ -1418,8 +1418,8 @@ public class ForkJoinPool extends Abstra */ final String nextWorkerName() { int n; - do {} while(!U.compareAndSwapInt(this, NEXTWORKERNUMBER, - n = nextWorkerNumber, ++n)); + do {} while (!U.compareAndSwapInt(this, NEXTWORKERNUMBER, + n = nextWorkerNumber, ++n)); return workerNamePrefix.concat(Integer.toString(n)); } @@ -1482,8 +1482,8 @@ public class ForkJoinPool extends Abstra if (wt != null && (w = wt.workQueue) != null) { w.runState = -1; // ensure runState is set long steals = w.totalSteals + w.nsteals, sc; - do {} while(!U.compareAndSwapLong(this, STEALCOUNT, - sc = stealCount, sc + steals)); + do {} while (!U.compareAndSwapLong(this, STEALCOUNT, + sc = stealCount, sc + steals)); int idx = w.poolIndex; while (!U.compareAndSwapInt(this, MAINLOCK, 0, 1)) tryAwaitMainLock(); @@ -2276,7 +2276,7 @@ public class ForkJoinPool extends Abstra for (long c;;) { if (((c = ctl) & STOP_BIT) != 0) { // already terminating if ((short)(c >>> TC_SHIFT) == -parallelism) { - synchronized(this) { + synchronized (this) { notifyAll(); // signal when 0 workers } } @@ -3000,7 +3000,7 @@ public class ForkJoinPool extends Abstra return true; long startTime = System.nanoTime(); boolean terminated = false; - synchronized(this) { + synchronized (this) { for (long waitTime = nanos, millis = 0L;;) { if (terminated = isTerminated() || waitTime <= 0L || @@ -3185,7 +3185,7 @@ public class ForkJoinPool extends Abstra defaultForkJoinWorkerThreadFactory : ((ForkJoinWorkerThreadFactory)ClassLoader. getSystemClassLoader().loadClass(fp).newInstance()); - Thread.UncaughtExceptionHandler ueh = (up == null)? null : + Thread.UncaughtExceptionHandler ueh = (up == null) ? null : ((Thread.UncaughtExceptionHandler)ClassLoader. getSystemClassLoader().loadClass(up).newInstance()); int par;