--- jsr166/src/test/loops/TimeoutLockLoops.java 2009/02/17 00:40:01 1.3 +++ jsr166/src/test/loops/TimeoutLockLoops.java 2011/03/15 19:47:06 1.6 @@ -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 @@ -23,11 +23,11 @@ public final class TimeoutLockLoops { 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; @@ -66,7 +66,7 @@ public final class TimeoutLockLoops { 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"); } @@ -79,7 +79,7 @@ public final class TimeoutLockLoops { public final void run() { try { - barrier.await(); + barrier.await(); int sum = v; int x = 17; int n = ITERS; @@ -104,9 +104,9 @@ public final class TimeoutLockLoops { barrier.await(); result += sum; } - catch (Exception ex) { + catch (Exception ex) { ex.printStackTrace(); - return; + return; } } }