ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/tck/FutureTaskTest.java
(Generate patch)

Comparing jsr166/src/test/tck/FutureTaskTest.java (file contents):
Revision 1.1 by dl, Sun Aug 31 19:24:55 2003 UTC vs.
Revision 1.2 by dl, Sun Sep 7 20:39:11 2003 UTC

# Line 111 | Line 111 | public class FutureTaskTest extends Test
111                  public Object call(){
112                      try{
113                          Thread.sleep(MEDIUM_DELAY_MS);
114 <                    }catch(InterruptedException e){
114 >                    } catch(InterruptedException e){
115                          fail("unexpected exception");
116                      }
117                      return Boolean.TRUE;
# Line 121 | Line 121 | public class FutureTaskTest extends Test
121                  public void run(){
122                      try{
123                          ft.get();
124 <                    }catch(Exception e){
124 >                    } catch(Exception e){
125                          fail("unexpected exception");
126                      }
127                  }
# Line 146 | Line 146 | public class FutureTaskTest extends Test
146                  public Object call(){
147                      try{
148                          Thread.sleep(MEDIUM_DELAY_MS);
149 <                    }catch(InterruptedException e){
149 >                    } catch(InterruptedException e){
150                          fail("unexpected exception");
151                      }
152                      return Boolean.TRUE;
# Line 182 | Line 182 | public class FutureTaskTest extends Test
182                  public Object call(){
183                      try{
184                          Thread.sleep(MEDIUM_DELAY_MS);
185 <                    }catch(InterruptedException e){
185 >                    } catch(InterruptedException e){
186                          fail("unexpected exception");
187                      }
188                      return Boolean.TRUE;
# Line 195 | Line 195 | public class FutureTaskTest extends Test
195                          try{
196                              ft.get();
197                              fail("should throw");
198 <                        }catch(CancellationException success){
198 >                        } catch(CancellationException success){
199                          }
200                          catch(Exception e){
201                              fail("unexpected exception");
# Line 205 | Line 205 | public class FutureTaskTest extends Test
205              t.start();
206              ft.cancel(true);
207              t.join();
208 <        }catch(InterruptedException sucess){
208 >        } catch(InterruptedException success){
209              fail("unexpected exception");
210          }
211      }
# Line 228 | Line 228 | public class FutureTaskTest extends Test
228                          try{
229                              ft.get(3 * SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
230                              fail("should throw");
231 <                        }catch(CancellationException success) {}
231 >                        } catch(CancellationException success) {}
232                          catch(Exception e){
233                              fail("unexpected exception");
234                          }
# Line 239 | Line 239 | public class FutureTaskTest extends Test
239              ft.cancel(true);
240              Thread.sleep(SHORT_DELAY_MS);
241              t.join();
242 <        }catch(InterruptedException ie){
242 >        } catch(InterruptedException ie){
243              fail("unexpected exception");
244          }
245      }
# Line 255 | Line 255 | public class FutureTaskTest extends Test
255              ft.run();
256              ft.get();
257              fail("should throw");
258 <        }catch(ExecutionException success){
258 >        } catch(ExecutionException success){
259          }
260          catch(Exception e){
261              fail("unexpected exception");
# Line 273 | Line 273 | public class FutureTaskTest extends Test
273              ft.run();
274              ft.get(SHORT_DELAY_MS, TimeUnit.MILLISECONDS);
275              fail("should throw");
276 <        }catch(ExecutionException success) {
277 <        }catch(TimeoutException success) { } // unlikely but OK
276 >        } catch(ExecutionException success) {
277 >        } catch(TimeoutException success) { } // unlikely but OK
278          catch(Exception e){
279              fail("unexpected exception");
280          }
# Line 319 | Line 319 | public class FutureTaskTest extends Test
319                      try{
320                          ft.get(100,TimeUnit.SECONDS);
321                          fail("should throw");
322 <                    }catch(InterruptedException success){}
322 >                    } catch(InterruptedException success){}
323                      catch(Exception e){
324                          fail("unexpected exception");
325                      }
# Line 344 | Line 344 | public class FutureTaskTest extends Test
344          try{
345              ft.get(1,TimeUnit.MILLISECONDS);
346              fail("should throw");
347 <        }catch(TimeoutException success){}
348 <        catch(Exception sucess){
347 >        } catch(TimeoutException success){}
348 >        catch(Exception success){
349              fail("unexpected exception");
350          }
351          

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines