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

Comparing jsr166/src/test/tck/AbstractQueuedLongSynchronizerTest.java (file contents):
Revision 1.7 by jsr166, Mon Nov 16 05:30:07 2009 UTC vs.
Revision 1.8 by jsr166, Tue Nov 17 13:40:14 2009 UTC

# Line 408 | Line 408 | public class AbstractQueuedLongSynchroni
408                      try {
409                          threadAssertFalse(sync.tryAcquireNanos(1, 1000 * 1000));
410                      } catch (Exception ex) {
411 <                        threadUnexpectedException();
411 >                        threadUnexpectedException(ex);
412                      }
413                  }
414              });
# Line 438 | Line 438 | public class AbstractQueuedLongSynchroni
438                          Thread.sleep(SMALL_DELAY_MS);
439                      }
440                      catch (Exception e) {
441 <                        threadUnexpectedException();
441 >                        threadUnexpectedException(e);
442                      }
443                      sync.release(1);
444                  }
# Line 604 | Line 604 | public class AbstractQueuedLongSynchroni
604                          sync.release(1);
605                      }
606                      catch (InterruptedException e) {
607 <                        threadUnexpectedException();
607 >                        threadUnexpectedException(e);
608                      }
609                  }
610              });
# Line 674 | Line 674 | public class AbstractQueuedLongSynchroni
674       */
675      public void testHasWaitersIAE() {
676          final Mutex sync = new Mutex();
677 <        final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition());
677 >        final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition();
678          final Mutex sync2 = new Mutex();
679          try {
680              sync2.hasWaiters(c);
# Line 690 | Line 690 | public class AbstractQueuedLongSynchroni
690       */
691      public void testHasWaitersIMSE() {
692          final Mutex sync = new Mutex();
693 <        final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition());
693 >        final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition();
694          try {
695              sync.hasWaiters(c);
696              shouldThrow();
# Line 706 | Line 706 | public class AbstractQueuedLongSynchroni
706       */
707      public void testGetWaitQueueLengthIAE() {
708          final Mutex sync = new Mutex();
709 <        final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition());
709 >        final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition();
710          final Mutex sync2 = new Mutex();
711          try {
712              sync2.getWaitQueueLength(c);
# Line 722 | Line 722 | public class AbstractQueuedLongSynchroni
722       */
723      public void testGetWaitQueueLengthIMSE() {
724          final Mutex sync = new Mutex();
725 <        final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition());
725 >        final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition();
726          try {
727              sync.getWaitQueueLength(c);
728              shouldThrow();
# Line 738 | Line 738 | public class AbstractQueuedLongSynchroni
738       */
739      public void testGetWaitingThreadsIAE() {
740          final Mutex sync = new Mutex();
741 <        final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition());
741 >        final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition();
742          final Mutex sync2 = new Mutex();
743          try {
744              sync2.getWaitingThreads(c);
# Line 754 | Line 754 | public class AbstractQueuedLongSynchroni
754       */
755      public void testGetWaitingThreadsIMSE() {
756          final Mutex sync = new Mutex();
757 <        final AbstractQueuedLongSynchronizer.ConditionObject c = (sync.newCondition());
757 >        final AbstractQueuedLongSynchronizer.ConditionObject c = sync.newCondition();
758          try {
759              sync.getWaitingThreads(c);
760              shouldThrow();
# Line 782 | Line 782 | public class AbstractQueuedLongSynchroni
782                          sync.release(1);
783                      }
784                      catch (InterruptedException e) {
785 <                        threadUnexpectedException();
785 >                        threadUnexpectedException(e);
786                      }
787                  }
788              });
# Line 824 | Line 824 | public class AbstractQueuedLongSynchroni
824                          sync.release(1);
825                      }
826                      catch (InterruptedException e) {
827 <                        threadUnexpectedException();
827 >                        threadUnexpectedException(e);
828                      }
829                  }
830              });
# Line 839 | Line 839 | public class AbstractQueuedLongSynchroni
839                          sync.release(1);
840                      }
841                      catch (InterruptedException e) {
842 <                        threadUnexpectedException();
842 >                        threadUnexpectedException(e);
843                      }
844                  }
845              });
# Line 884 | Line 884 | public class AbstractQueuedLongSynchroni
884                          sync.release(1);
885                      }
886                      catch (InterruptedException e) {
887 <                        threadUnexpectedException();
887 >                        threadUnexpectedException(e);
888                      }
889                  }
890              });
# Line 898 | Line 898 | public class AbstractQueuedLongSynchroni
898                          sync.release(1);
899                      }
900                      catch (InterruptedException e) {
901 <                        threadUnexpectedException();
901 >                        threadUnexpectedException(e);
902                      }
903                  }
904              });

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines