--- jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java 2009/11/02 20:28:31 1.22 +++ jsr166/src/test/tck/AbstractQueuedSynchronizerTest.java 2009/11/16 04:57:09 1.23 @@ -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(); } } @@ -434,7 +434,7 @@ public class AbstractQueuedSynchronizerT try { Thread.sleep(SMALL_DELAY_MS); } - catch(Exception e) { + catch (Exception e) { threadUnexpectedException(); } sync.release(1); @@ -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(); } } @@ -478,7 +478,7 @@ public class AbstractQueuedSynchronizerT final Mutex sync = new Mutex(); try { sync.acquireInterruptibly(1); - } catch(Exception e) { + } catch (Exception e) { unexpectedException(); } Thread t = new Thread(new InterruptedSyncRunnable(sync)); @@ -487,7 +487,7 @@ public class AbstractQueuedSynchronizerT t.interrupt(); assertTrue(sync.isHeldExclusively()); t.join(); - } catch(Exception e){ + } catch (Exception e){ unexpectedException(); } } @@ -600,7 +600,7 @@ public class AbstractQueuedSynchronizerT c.await(); sync.release(1); } - catch(InterruptedException e) { + catch (InterruptedException e) { threadUnexpectedException(); } } @@ -778,7 +778,7 @@ public class AbstractQueuedSynchronizerT c.await(); sync.release(1); } - catch(InterruptedException e) { + catch (InterruptedException e) { threadUnexpectedException(); } } @@ -820,7 +820,7 @@ public class AbstractQueuedSynchronizerT c.await(); sync.release(1); } - catch(InterruptedException e) { + catch (InterruptedException e) { threadUnexpectedException(); } } @@ -835,7 +835,7 @@ public class AbstractQueuedSynchronizerT c.await(); sync.release(1); } - catch(InterruptedException e) { + catch (InterruptedException e) { threadUnexpectedException(); } } @@ -880,7 +880,7 @@ public class AbstractQueuedSynchronizerT c.await(); sync.release(1); } - catch(InterruptedException e) { + catch (InterruptedException e) { threadUnexpectedException(); } } @@ -894,7 +894,7 @@ public class AbstractQueuedSynchronizerT c.await(); sync.release(1); } - catch(InterruptedException e) { + catch (InterruptedException e) { threadUnexpectedException(); } } @@ -974,7 +974,7 @@ public class AbstractQueuedSynchronizerT sync.release(1); threadShouldThrow(); } - catch(InterruptedException success) { + catch (InterruptedException success) { } } }); @@ -1005,7 +1005,7 @@ public class AbstractQueuedSynchronizerT sync.release(1); threadShouldThrow(); } - catch(InterruptedException success) { + catch (InterruptedException success) { } } }); @@ -1037,7 +1037,7 @@ public class AbstractQueuedSynchronizerT sync.release(1); threadShouldThrow(); } - catch(InterruptedException success) { + catch (InterruptedException success) { } } }); @@ -1067,7 +1067,7 @@ public class AbstractQueuedSynchronizerT c.await(); sync.release(1); } - catch(InterruptedException e) { + catch (InterruptedException e) { threadUnexpectedException(); } } @@ -1080,7 +1080,7 @@ public class AbstractQueuedSynchronizerT c.await(); sync.release(1); } - catch(InterruptedException e) { + catch (InterruptedException e) { threadUnexpectedException(); } } @@ -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(); } } @@ -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(); } } @@ -1234,7 +1234,7 @@ public class AbstractQueuedSynchronizerT threadAssertFalse(l.isSignalled()); l.acquireSharedInterruptibly(0); threadShouldThrow(); - } catch(InterruptedException success){} + } catch (InterruptedException success){} } }); t.start(); @@ -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(); @@ -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(); } }