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

Comparing jsr166/src/test/tck/ReentrantLockTest.java (file contents):
Revision 1.30 by jsr166, Sat Nov 21 02:07:27 2009 UTC vs.
Revision 1.31 by jsr166, Sat Nov 21 02:33:20 2009 UTC

# Line 9 | Line 9
9   import junit.framework.*;
10   import java.util.concurrent.locks.*;
11   import java.util.concurrent.*;
12 + import static java.util.concurrent.TimeUnit.MILLISECONDS;
13   import java.util.*;
14   import java.io.*;
15  
# Line 265 | Line 266 | public class ReentrantLockTest extends J
266          lock.lock();
267          Thread t = new Thread(new CheckedInterruptedRunnable() {
268              public void realRun() throws InterruptedException {
269 <                lock.tryLock(MEDIUM_DELAY_MS,TimeUnit.MILLISECONDS);
269 >                lock.tryLock(MEDIUM_DELAY_MS,MILLISECONDS);
270              }});
271  
272          t.start();
# Line 298 | Line 299 | public class ReentrantLockTest extends J
299          lock.lock();
300          Thread t = new Thread(new CheckedRunnable() {
301              public void realRun() throws InterruptedException {
302 <                threadAssertFalse(lock.tryLock(1, TimeUnit.MILLISECONDS));
302 >                threadAssertFalse(lock.tryLock(1, MILLISECONDS));
303              }});
304  
305          t.start();
# Line 418 | Line 419 | public class ReentrantLockTest extends J
419          final ReentrantLock lock = new ReentrantLock();
420          final Condition c = lock.newCondition();
421          lock.lock();
422 <        assertFalse(c.await(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));
422 >        assertFalse(c.await(SHORT_DELAY_MS, MILLISECONDS));
423          lock.unlock();
424      }
425  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines