--- jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java 2009/11/16 04:57:09 1.23 +++ jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java 2009/11/16 05:30:07 1.24 @@ -73,7 +73,7 @@ public class AbstractQueuedSynchronizerT public void run() { try { sync.acquireInterruptibly(1); - } catch (InterruptedException success){} + } catch (InterruptedException success) {} } } @@ -89,7 +89,7 @@ public class AbstractQueuedSynchronizerT try { sync.acquireInterruptibly(1); threadShouldThrow(); - } catch (InterruptedException success){} + } catch (InterruptedException success) {} } } @@ -146,7 +146,7 @@ public class AbstractQueuedSynchronizerT assertFalse(sync.hasQueuedThreads()); t1.join(); t2.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -192,7 +192,7 @@ public class AbstractQueuedSynchronizerT assertFalse(sync.isQueued(t2)); t1.join(); t2.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -222,7 +222,7 @@ public class AbstractQueuedSynchronizerT assertNull(sync.getFirstQueuedThread()); t1.join(); t2.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -252,7 +252,7 @@ public class AbstractQueuedSynchronizerT assertTrue(sync.hasContended()); t1.join(); t2.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -284,7 +284,7 @@ public class AbstractQueuedSynchronizerT assertTrue(sync.getQueuedThreads().isEmpty()); t1.join(); t2.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -316,7 +316,7 @@ public class AbstractQueuedSynchronizerT assertTrue(sync.getExclusiveQueuedThreads().isEmpty()); t1.join(); t2.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -346,7 +346,7 @@ public class AbstractQueuedSynchronizerT assertTrue(sync.getSharedQueuedThreads().isEmpty()); t1.join(); t2.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -362,13 +362,13 @@ public class AbstractQueuedSynchronizerT try { sync.tryAcquireNanos(1, MEDIUM_DELAY_MS * 1000 * 1000); threadShouldThrow(); - } catch (InterruptedException success){} + } catch (InterruptedException success) {} } }); try { t.start(); t.interrupt(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -389,7 +389,7 @@ public class AbstractQueuedSynchronizerT t.start(); t.join(); sync.release(1); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -413,7 +413,7 @@ public class AbstractQueuedSynchronizerT t.start(); t.join(); sync.release(1); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -446,7 +446,7 @@ public class AbstractQueuedSynchronizerT assertTrue(sync.isHeldExclusively()); t.join(); assertFalse(sync.isHeldExclusively()); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -466,7 +466,7 @@ public class AbstractQueuedSynchronizerT Thread.sleep(SHORT_DELAY_MS); sync.release(1); t.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -487,7 +487,7 @@ public class AbstractQueuedSynchronizerT t.interrupt(); assertTrue(sync.isHeldExclusively()); t.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -1134,7 +1134,7 @@ public class AbstractQueuedSynchronizerT ObjectInputStream in = new ObjectInputStream(new BufferedInputStream(bin)); Mutex r = (Mutex) in.readObject(); assertTrue(r.isHeldExclusively()); - } catch (Exception e){ + } catch (Exception e) { e.printStackTrace(); unexpectedException(); } @@ -1175,7 +1175,7 @@ public class AbstractQueuedSynchronizerT threadAssertFalse(l.isSignalled()); l.acquireSharedInterruptibly(0); threadAssertTrue(l.isSignalled()); - } catch (InterruptedException e){ + } catch (InterruptedException e) { threadUnexpectedException(); } } @@ -1187,7 +1187,7 @@ public class AbstractQueuedSynchronizerT l.releaseShared(0); assertTrue(l.isSignalled()); t.join(); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } } @@ -1206,7 +1206,7 @@ public class AbstractQueuedSynchronizerT threadAssertTrue(l.tryAcquireSharedNanos(0, MEDIUM_DELAY_MS* 1000 * 1000)); threadAssertTrue(l.isSignalled()); - } catch (InterruptedException e){ + } catch (InterruptedException e) { threadUnexpectedException(); } } @@ -1218,7 +1218,7 @@ public class AbstractQueuedSynchronizerT l.releaseShared(0); assertTrue(l.isSignalled()); t.join(); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } } @@ -1234,7 +1234,7 @@ public class AbstractQueuedSynchronizerT threadAssertFalse(l.isSignalled()); l.acquireSharedInterruptibly(0); threadShouldThrow(); - } catch (InterruptedException success){} + } catch (InterruptedException success) {} } }); t.start(); @@ -1242,7 +1242,7 @@ public class AbstractQueuedSynchronizerT assertFalse(l.isSignalled()); t.interrupt(); t.join(); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } } @@ -1258,7 +1258,7 @@ public class AbstractQueuedSynchronizerT threadAssertFalse(l.isSignalled()); l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000); threadShouldThrow(); - } catch (InterruptedException success){} + } catch (InterruptedException success) {} } }); t.start(); @@ -1267,7 +1267,7 @@ public class AbstractQueuedSynchronizerT assertFalse(l.isSignalled()); t.interrupt(); t.join(); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } } @@ -1282,7 +1282,7 @@ public class AbstractQueuedSynchronizerT try { threadAssertFalse(l.isSignalled()); threadAssertFalse(l.tryAcquireSharedNanos(0, SMALL_DELAY_MS* 1000 * 1000)); - } catch (InterruptedException ie){ + } catch (InterruptedException ie) { threadUnexpectedException(); } } @@ -1292,7 +1292,7 @@ public class AbstractQueuedSynchronizerT Thread.sleep(SHORT_DELAY_MS); assertFalse(l.isSignalled()); t.join(); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } }