--- jsr166/src/test/tck/ReentrantLockTest.java 2015/02/02 04:50:55 1.56 +++ jsr166/src/test/tck/ReentrantLockTest.java 2015/04/25 04:55:31 1.58 @@ -22,7 +22,7 @@ import junit.framework.TestSuite; public class ReentrantLockTest extends JSR166TestCase { public static void main(String[] args) { - junit.textui.TestRunner.run(suite()); + main(suite(), args); } public static Test suite() { return new TestSuite(ReentrantLockTest.class); @@ -460,9 +460,7 @@ public class ReentrantLockTest extends J barrier.await(); awaitTermination(t); assertFalse(lock.isLocked()); - } catch (Exception e) { - threadUnexpectedException(e); - } + } catch (Exception fail) { threadUnexpectedException(fail); } } /** @@ -474,9 +472,7 @@ public class ReentrantLockTest extends J final PublicReentrantLock lock = new PublicReentrantLock(fair); try { lock.lockInterruptibly(); - } catch (InterruptedException ie) { - threadUnexpectedException(ie); - } + } catch (InterruptedException fail) { threadUnexpectedException(fail); } assertLockedByMoi(lock); Thread t = newStartedThread(new InterruptedLockRunnable(lock)); waitForQueuedThread(lock, t); @@ -537,9 +533,7 @@ public class ReentrantLockTest extends J assertTrue(nanosRemaining <= 0); assertTrue(millisElapsedSince(startTime) >= timeoutMillis); lock.unlock(); - } catch (InterruptedException e) { - threadUnexpectedException(e); - } + } catch (InterruptedException fail) { threadUnexpectedException(fail); } } /** @@ -557,9 +551,7 @@ public class ReentrantLockTest extends J assertFalse(c.await(timeoutMillis, MILLISECONDS)); assertTrue(millisElapsedSince(startTime) >= timeoutMillis); lock.unlock(); - } catch (InterruptedException e) { - threadUnexpectedException(e); - } + } catch (InterruptedException fail) { threadUnexpectedException(fail); } } /** @@ -578,9 +570,7 @@ public class ReentrantLockTest extends J assertFalse(c.awaitUntil(new java.util.Date(d.getTime() + timeoutMillis))); assertTrue(millisElapsedSince(startTime) >= timeoutMillis); lock.unlock(); - } catch (InterruptedException e) { - threadUnexpectedException(e); - } + } catch (InterruptedException fail) { threadUnexpectedException(fail); } } /**