--- jsr166/src/test/tck/FutureTaskTest.java 2009/11/16 04:57:10 1.13 +++ jsr166/src/test/tck/FutureTaskTest.java 2009/11/16 05:30:07 1.14 @@ -174,7 +174,7 @@ public class FutureTaskTest extends JSR1 t.join(); assertTrue(task.isDone()); assertTrue(task.isCancelled()); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } } @@ -203,7 +203,7 @@ public class FutureTaskTest extends JSR1 t.join(); assertTrue(task.isDone()); assertTrue(task.isCancelled()); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } } @@ -216,7 +216,7 @@ public class FutureTaskTest extends JSR1 public Object call() { try { Thread.sleep(MEDIUM_DELAY_MS); - } catch (InterruptedException e){ + } catch (InterruptedException e) { threadUnexpectedException(); } return Boolean.TRUE; @@ -226,7 +226,7 @@ public class FutureTaskTest extends JSR1 public void run() { try { ft.get(); - } catch (Exception e){ + } catch (Exception e) { threadUnexpectedException(); } } @@ -240,7 +240,7 @@ public class FutureTaskTest extends JSR1 t.join(); assertTrue(ft.isDone()); assertFalse(ft.isCancelled()); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } @@ -254,7 +254,7 @@ public class FutureTaskTest extends JSR1 public Object call() { try { Thread.sleep(MEDIUM_DELAY_MS); - } catch (InterruptedException e){ + } catch (InterruptedException e) { threadUnexpectedException(); } return Boolean.TRUE; @@ -265,7 +265,7 @@ public class FutureTaskTest extends JSR1 try { ft.get(SHORT_DELAY_MS, TimeUnit.MILLISECONDS); } catch (TimeoutException success) { - } catch (Exception e){ + } catch (Exception e) { threadUnexpectedException(); } } @@ -278,7 +278,7 @@ public class FutureTaskTest extends JSR1 t.join(); assertTrue(ft.isDone()); assertFalse(ft.isCancelled()); - } catch (InterruptedException e){ + } catch (InterruptedException e) { unexpectedException(); } @@ -305,7 +305,7 @@ public class FutureTaskTest extends JSR1 ft.get(MEDIUM_DELAY_MS, TimeUnit.MILLISECONDS); threadShouldThrow(); } catch (CancellationException success) {} - catch (Exception e){ + catch (Exception e) { threadUnexpectedException(); } } @@ -317,7 +317,7 @@ public class FutureTaskTest extends JSR1 ft.cancel(true); t1.join(); t2.join(); - } catch (InterruptedException ie){ + } catch (InterruptedException ie) { unexpectedException(); } } @@ -331,7 +331,7 @@ public class FutureTaskTest extends JSR1 try { Thread.sleep(MEDIUM_DELAY_MS); threadShouldThrow(); - } catch (InterruptedException e){ + } catch (InterruptedException e) { } return Boolean.TRUE; } @@ -342,9 +342,9 @@ public class FutureTaskTest extends JSR1 try { ft.get(); threadShouldThrow(); - } catch (CancellationException success){ + } catch (CancellationException success) { } - catch (Exception e){ + catch (Exception e) { threadUnexpectedException(); } } @@ -356,7 +356,7 @@ public class FutureTaskTest extends JSR1 ft.cancel(true); t1.join(); t2.join(); - } catch (InterruptedException success){ + } catch (InterruptedException success) { unexpectedException(); } } @@ -376,9 +376,9 @@ public class FutureTaskTest extends JSR1 ft.run(); ft.get(); shouldThrow(); - } catch (ExecutionException success){ + } catch (ExecutionException success) { } - catch (Exception e){ + catch (Exception e) { unexpectedException(); } } @@ -399,7 +399,7 @@ public class FutureTaskTest extends JSR1 shouldThrow(); } catch (ExecutionException success) { } catch (TimeoutException success) { } // unlikely but OK - catch (Exception e){ + catch (Exception e) { unexpectedException(); } } @@ -415,8 +415,8 @@ public class FutureTaskTest extends JSR1 try { ft.get(); threadShouldThrow(); - } catch (InterruptedException success){ - } catch (Exception e){ + } catch (InterruptedException success) { + } catch (Exception e) { threadUnexpectedException(); } } @@ -426,7 +426,7 @@ public class FutureTaskTest extends JSR1 Thread.sleep(SHORT_DELAY_MS); t.interrupt(); t.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -441,8 +441,8 @@ public class FutureTaskTest extends JSR1 try { ft.get(LONG_DELAY_MS,TimeUnit.MILLISECONDS); threadShouldThrow(); - } catch (InterruptedException success){} - catch (Exception e){ + } catch (InterruptedException success) {} + catch (Exception e) { threadUnexpectedException(); } } @@ -452,7 +452,7 @@ public class FutureTaskTest extends JSR1 Thread.sleep(SHORT_DELAY_MS); t.interrupt(); t.join(); - } catch (Exception e){ + } catch (Exception e) { unexpectedException(); } } @@ -465,8 +465,8 @@ public class FutureTaskTest extends JSR1 FutureTask ft = new FutureTask(new NoOpCallable()); ft.get(1,TimeUnit.MILLISECONDS); shouldThrow(); - } catch (TimeoutException success){} - catch (Exception success){ + } catch (TimeoutException success) {} + catch (Exception success) { unexpectedException(); } }