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

Comparing jsr166/src/test/tck/ReentrantReadWriteLockTest.java (file contents):
Revision 1.35 by jsr166, Sat Nov 21 02:07:27 2009 UTC vs.
Revision 1.36 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.io.*;
14   import java.util.*;
15  
# Line 214 | Line 215 | public class ReentrantReadWriteLockTest
215          lock.writeLock().lock();
216          Thread t = new Thread(new CheckedInterruptedRunnable() {
217              public void realRun() throws InterruptedException {
218 <                lock.writeLock().tryLock(1000,TimeUnit.MILLISECONDS);
218 >                lock.writeLock().tryLock(1000,MILLISECONDS);
219              }});
220  
221          t.start();
# Line 250 | Line 251 | public class ReentrantReadWriteLockTest
251          lock.writeLock().lock();
252          Thread t = new Thread(new CheckedInterruptedRunnable() {
253              public void realRun() throws InterruptedException {
254 <                lock.readLock().tryLock(1000,TimeUnit.MILLISECONDS);
254 >                lock.readLock().tryLock(1000,MILLISECONDS);
255              }});
256  
257          t.start();
# Line 688 | Line 689 | public class ReentrantReadWriteLockTest
689          lock.writeLock().lock();
690          Thread t = new Thread(new CheckedRunnable() {
691              public void realRun() throws InterruptedException {
692 <                threadAssertFalse(lock.writeLock().tryLock(1, TimeUnit.MILLISECONDS));
692 >                threadAssertFalse(lock.writeLock().tryLock(1, MILLISECONDS));
693              }});
694  
695          t.start();
# Line 705 | Line 706 | public class ReentrantReadWriteLockTest
706          lock.writeLock().lock();
707          Thread t = new Thread(new CheckedRunnable() {
708              public void realRun() throws InterruptedException {
709 <                threadAssertFalse(lock.readLock().tryLock(1, TimeUnit.MILLISECONDS));
709 >                threadAssertFalse(lock.readLock().tryLock(1, MILLISECONDS));
710              }});
711  
712          t.start();
# Line 797 | Line 798 | public class ReentrantReadWriteLockTest
798          final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
799          final Condition c = lock.writeLock().newCondition();
800          lock.writeLock().lock();
801 <        assertFalse(c.await(SHORT_DELAY_MS, TimeUnit.MILLISECONDS));
801 >        assertFalse(c.await(SHORT_DELAY_MS, MILLISECONDS));
802          lock.writeLock().unlock();
803      }
804  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines