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.69 by jsr166, Wed Dec 31 19:05:43 2014 UTC vs.
Revision 1.72 by jsr166, Fri Feb 27 22:06:24 2015 UTC

# Line 174 | Line 174 | public class ReentrantReadWriteLockTest
174              java.util.Date d = new java.util.Date();
175              assertTrue(c.awaitUntil(new java.util.Date(d.getTime() + 2 * LONG_DELAY_MS)));
176              break;
177 +        default:
178 +            throw new AssertionError();
179          }
180      }
181  
# Line 828 | Line 830 | public class ReentrantReadWriteLockTest
830              new PublicReentrantReadWriteLock(fair);
831          try {
832              lock.writeLock().lockInterruptibly();
833 <        } catch (InterruptedException ie) {
832 <            threadUnexpectedException(ie);
833 <        }
833 >        } catch (InterruptedException fail) { threadUnexpectedException(fail); }
834          Thread t = newStartedThread(new CheckedInterruptedRunnable() {
835              public void realRun() throws InterruptedException {
836                  lock.writeLock().lockInterruptibly();
# Line 855 | Line 855 | public class ReentrantReadWriteLockTest
855              lock.readLock().lockInterruptibly();
856              lock.readLock().unlock();
857              lock.writeLock().lockInterruptibly();
858 <        } catch (InterruptedException ie) {
859 <            threadUnexpectedException(ie);
860 <        }
858 >        } catch (InterruptedException fail) { threadUnexpectedException(fail); }
859          Thread t = newStartedThread(new CheckedInterruptedRunnable() {
860              public void realRun() throws InterruptedException {
861                  lock.readLock().lockInterruptibly();
# Line 883 | Line 881 | public class ReentrantReadWriteLockTest
881                  await(c, awaitMethod);
882                  shouldThrow();
883              } catch (IllegalMonitorStateException success) {
884 <            } catch (InterruptedException e) { threadUnexpectedException(e); }
884 >            } catch (InterruptedException fail) {
885 >                threadUnexpectedException(fail);
886 >            }
887              assertTrue(millisElapsedSince(startTime) < LONG_DELAY_MS);
888          }
889      }
# Line 934 | Line 934 | public class ReentrantReadWriteLockTest
934              assertTrue(nanosRemaining <= 0);
935              assertTrue(millisElapsedSince(startTime) >= timeoutMillis);
936              lock.writeLock().unlock();
937 <        } catch (InterruptedException e) {
938 <            threadUnexpectedException(e);
939 <        }
937 >        } catch (InterruptedException fail) { threadUnexpectedException(fail); }
938      }
939  
940      /**
# Line 955 | Line 953 | public class ReentrantReadWriteLockTest
953              assertFalse(c.await(timeoutMillis, MILLISECONDS));
954              assertTrue(millisElapsedSince(startTime) >= timeoutMillis);
955              lock.writeLock().unlock();
956 <        } catch (InterruptedException e) {
959 <            threadUnexpectedException(e);
960 <        }
956 >        } catch (InterruptedException fail) { threadUnexpectedException(fail); }
957      }
958  
959      /**
# Line 977 | Line 973 | public class ReentrantReadWriteLockTest
973              assertFalse(c.awaitUntil(new java.util.Date(d.getTime() + timeoutMillis)));
974              assertTrue(millisElapsedSince(startTime) >= timeoutMillis);
975              lock.writeLock().unlock();
976 <        } catch (InterruptedException e) {
981 <            threadUnexpectedException(e);
982 <        }
976 >        } catch (InterruptedException fail) { threadUnexpectedException(fail); }
977      }
978  
979      /**

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines