ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/loops/CancelledLockLoops.java
(Generate patch)

Comparing jsr166/src/test/loops/CancelledLockLoops.java (file contents):
Revision 1.4 by jsr166, Thu Oct 29 23:09:07 2009 UTC vs.
Revision 1.7 by jsr166, Tue Nov 3 01:04:02 2009 UTC

# Line 26 | Line 26 | public final class CancelledLockLoops {
26              try {
27                  new ReentrantLockLoop(i).test();
28              }
29 <            catch(BrokenBarrierException bb) {
29 >            catch (BrokenBarrierException bb) {
30                  // OK, ignore
31              }
32          }
# Line 51 | Line 51 | public final class CancelledLockLoops {
51                  threads[i] = new Thread(this);
52              for (int i = 0; i < threads.length; ++i)
53                  threads[i].start();
54 <            Thread[] cancels = (Thread[]) (threads.clone());
54 >            Thread[] cancels = threads.clone();
55              Collections.shuffle(Arrays.asList(cancels), rng);
56              barrier.await();
57              Thread.sleep(TIMEOUT);
# Line 64 | Line 64 | public final class CancelledLockLoops {
64              barrier.await();
65              if (print) {
66                  long time = timer.getTime();
67 <                double secs = (double)(time) / 1000000000.0;
67 >                double secs = (double) time / 1000000000.0;
68                  System.out.println("\t " + secs + "s run time");
69              }
70  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines