--- jsr166/src/test/loops/TimeoutMutexLoops.java 2005/05/09 19:33:30 1.2 +++ jsr166/src/test/loops/TimeoutMutexLoops.java 2011/03/15 19:47:06 1.5 @@ -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/ */ /* * @test @@ -20,11 +20,11 @@ public final class TimeoutMutexLoops { static final LoopHelpers.SimpleRandom rng = new LoopHelpers.SimpleRandom(); static boolean print = false; static final int ITERS = Integer.MAX_VALUE; - static final long TIMEOUT = 100; + static final long TIMEOUT = 100; public static void main(String[] args) throws Exception { int maxThreads = 100; - if (args.length > 0) + if (args.length > 0) maxThreads = Integer.parseInt(args[0]); print = true; @@ -51,7 +51,7 @@ public final class TimeoutMutexLoops { } final void test() throws Exception { - for (int i = 0; i < nthreads; ++i) + for (int i = 0; i < nthreads; ++i) pool.execute(this); barrier.await(); Thread.sleep(TIMEOUT); @@ -59,7 +59,7 @@ public final class TimeoutMutexLoops { barrier.await(); if (print) { long time = timer.getTime(); - double secs = (double)(time) / 1000000000.0; + double secs = (double) time / 1000000000.0; System.out.println("\t " + secs + "s run time"); } @@ -72,7 +72,7 @@ public final class TimeoutMutexLoops { public final void run() { try { - barrier.await(); + barrier.await(); int sum = v; int x = 0; int n = ITERS; @@ -92,8 +92,8 @@ public final class TimeoutMutexLoops { barrier.await(); result += sum; } - catch (Exception ie) { - return; + catch (Exception ie) { + return; } } }