--- jsr166/src/test/loops/CancelledLockLoops.java 2009/10/29 23:09:07 1.4 +++ jsr166/src/test/loops/CancelledLockLoops.java 2011/03/15 19:47:05 1.8 @@ -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.*; @@ -26,7 +26,7 @@ public final class CancelledLockLoops { try { new ReentrantLockLoop(i).test(); } - catch(BrokenBarrierException bb) { + catch (BrokenBarrierException bb) { // OK, ignore } } @@ -51,7 +51,7 @@ public final class CancelledLockLoops { threads[i] = new Thread(this); for (int i = 0; i < threads.length; ++i) threads[i].start(); - Thread[] cancels = (Thread[]) (threads.clone()); + Thread[] cancels = threads.clone(); Collections.shuffle(Arrays.asList(cancels), rng); barrier.await(); Thread.sleep(TIMEOUT); @@ -64,7 +64,7 @@ public final class CancelledLockLoops { 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"); }