--- jsr166/src/test/loops/NoopLockLoops.java 2009/11/03 01:04:02 1.4 +++ jsr166/src/test/loops/NoopLockLoops.java 2014/12/18 18:13:06 1.7 @@ -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.concurrent.*; @@ -23,8 +23,7 @@ public final class NoopLockLoops { new ReentrantLockLoop(1).test(); print = true; - int k = 1; - for (int i = 1; i <= maxThreads;) { + for (int k = 1, i = 1; i <= maxThreads;) { System.out.print("Threads: " + i); new ReentrantLockLoop(i).test(); Thread.sleep(100); @@ -75,7 +74,7 @@ public final class NoopLockLoops { int x = sum + 1; int n = iters; while (n-- > 0) { - synchronized(this) { + synchronized (this) { x = LoopHelpers.compute4(x); } sum += x;