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.30 by jsr166, Mon Nov 16 05:30:08 2009 UTC vs.
Revision 1.31 by jsr166, Tue Nov 17 13:40:14 2009 UTC

# Line 1407 | Line 1407 | public class ReentrantReadWriteLockTest
1407       */
1408      public void testHasWaitersIAE() {
1409          final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
1410 <        final Condition c = (lock.writeLock().newCondition());
1410 >        final Condition c = lock.writeLock().newCondition();
1411          final ReentrantReadWriteLock lock2 = new ReentrantReadWriteLock();
1412          try {
1413              lock2.hasWaiters(c);
# Line 1423 | Line 1423 | public class ReentrantReadWriteLockTest
1423       */
1424      public void testHasWaitersIMSE() {
1425          final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
1426 <        final Condition c = (lock.writeLock().newCondition());
1426 >        final Condition c = lock.writeLock().newCondition();
1427          try {
1428              lock.hasWaiters(c);
1429              shouldThrow();
# Line 1439 | Line 1439 | public class ReentrantReadWriteLockTest
1439       */
1440      public void testGetWaitQueueLengthIAE() {
1441          final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
1442 <        final Condition c = (lock.writeLock().newCondition());
1442 >        final Condition c = lock.writeLock().newCondition();
1443          final ReentrantReadWriteLock lock2 = new ReentrantReadWriteLock();
1444          try {
1445              lock2.getWaitQueueLength(c);
# Line 1455 | Line 1455 | public class ReentrantReadWriteLockTest
1455       */
1456      public void testGetWaitQueueLengthIMSE() {
1457          final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
1458 <        final Condition c = (lock.writeLock().newCondition());
1458 >        final Condition c = lock.writeLock().newCondition();
1459          try {
1460              lock.getWaitQueueLength(c);
1461              shouldThrow();
# Line 1471 | Line 1471 | public class ReentrantReadWriteLockTest
1471       */
1472      public void testGetWaitingThreadsIAE() {
1473          final PublicReentrantReadWriteLock lock = new PublicReentrantReadWriteLock();
1474 <        final Condition c = (lock.writeLock().newCondition());
1474 >        final Condition c = lock.writeLock().newCondition();
1475          final PublicReentrantReadWriteLock lock2 = new PublicReentrantReadWriteLock();
1476          try {
1477              lock2.getWaitingThreads(c);
# Line 1487 | Line 1487 | public class ReentrantReadWriteLockTest
1487       */
1488      public void testGetWaitingThreadsIMSE() {
1489          final PublicReentrantReadWriteLock lock = new PublicReentrantReadWriteLock();
1490 <        final Condition c = (lock.writeLock().newCondition());
1490 >        final Condition c = lock.writeLock().newCondition();
1491          try {
1492              lock.getWaitingThreads(c);
1493              shouldThrow();
# Line 1503 | Line 1503 | public class ReentrantReadWriteLockTest
1503       */
1504      public void testHasWaiters() {
1505          final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
1506 <        final Condition c = (lock.writeLock().newCondition());
1506 >        final Condition c = lock.writeLock().newCondition();
1507          Thread t = new Thread(new Runnable() {
1508                  public void run() {
1509                      try {
# Line 1545 | Line 1545 | public class ReentrantReadWriteLockTest
1545       */
1546      public void testGetWaitQueueLength() {
1547          final ReentrantReadWriteLock lock = new ReentrantReadWriteLock();
1548 <        final Condition c = (lock.writeLock().newCondition());
1548 >        final Condition c = lock.writeLock().newCondition();
1549          Thread t = new Thread(new Runnable() {
1550                  public void run() {
1551                      try {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines