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

Comparing jsr166/src/test/tck/ReentrantLockTest.java (file contents):
Revision 1.27 by jsr166, Mon Nov 16 04:57:10 2009 UTC vs.
Revision 1.28 by jsr166, Mon Nov 16 05:30:08 2009 UTC

# Line 29 | Line 29 | public class ReentrantLockTest extends J
29          public void run() {
30              try {
31                  lock.lockInterruptibly();
32 <            } catch (InterruptedException success){}
32 >            } catch (InterruptedException success) {}
33          }
34      }
35  
# Line 45 | Line 45 | public class ReentrantLockTest extends J
45              try {
46                  lock.lockInterruptibly();
47                  threadShouldThrow();
48 <            } catch (InterruptedException success){}
48 >            } catch (InterruptedException success) {}
49          }
50      }
51  
# Line 103 | Line 103 | public class ReentrantLockTest extends J
103              rl.unlock();
104              shouldThrow();
105  
106 <        } catch (IllegalMonitorStateException success){}
106 >        } catch (IllegalMonitorStateException success) {}
107      }
108  
109      /**
# Line 141 | Line 141 | public class ReentrantLockTest extends J
141              assertFalse(lock.hasQueuedThreads());
142              t1.join();
143              t2.join();
144 <        } catch (Exception e){
144 >        } catch (Exception e) {
145              unexpectedException();
146          }
147      }
# Line 170 | Line 170 | public class ReentrantLockTest extends J
170              assertEquals(0, lock.getQueueLength());
171              t1.join();
172              t2.join();
173 <        } catch (Exception e){
173 >        } catch (Exception e) {
174              unexpectedException();
175          }
176      }
# Line 199 | Line 199 | public class ReentrantLockTest extends J
199              assertEquals(0, lock.getQueueLength());
200              t1.join();
201              t2.join();
202 <        } catch (Exception e){
202 >        } catch (Exception e) {
203              unexpectedException();
204          }
205      }
# Line 245 | Line 245 | public class ReentrantLockTest extends J
245              assertFalse(sync.hasQueuedThread(t2));
246              t1.join();
247              t2.join();
248 <        } catch (Exception e){
248 >        } catch (Exception e) {
249              unexpectedException();
250          }
251      }
# Line 278 | Line 278 | public class ReentrantLockTest extends J
278              assertTrue(lock.getQueuedThreads().isEmpty());
279              t1.join();
280              t2.join();
281 <        } catch (Exception e){
281 >        } catch (Exception e) {
282              unexpectedException();
283          }
284      }
# Line 295 | Line 295 | public class ReentrantLockTest extends J
295                      try {
296                          lock.tryLock(MEDIUM_DELAY_MS,TimeUnit.MILLISECONDS);
297                          threadShouldThrow();
298 <                    } catch (InterruptedException success){}
298 >                    } catch (InterruptedException success) {}
299                  }
300              });
301          try {
302              t.start();
303              t.interrupt();
304 <        } catch (Exception e){
304 >        } catch (Exception e) {
305              unexpectedException();
306          }
307      }
# Line 322 | Line 322 | public class ReentrantLockTest extends J
322              t.start();
323              t.join();
324              lock.unlock();
325 <        } catch (Exception e){
325 >        } catch (Exception e) {
326              unexpectedException();
327          }
328      }
# Line 346 | Line 346 | public class ReentrantLockTest extends J
346              t.start();
347              t.join();
348              lock.unlock();
349 <        } catch (Exception e){
349 >        } catch (Exception e) {
350              unexpectedException();
351          }
352      }
# Line 394 | Line 394 | public class ReentrantLockTest extends J
394              assertTrue(lock.isLocked());
395              t.join();
396              assertFalse(lock.isLocked());
397 <        } catch (Exception e){
397 >        } catch (Exception e) {
398              unexpectedException();
399          }
400      }
# Line 414 | Line 414 | public class ReentrantLockTest extends J
414              Thread.sleep(SHORT_DELAY_MS);
415              lock.unlock();
416              t.join();
417 <        } catch (Exception e){
417 >        } catch (Exception e) {
418              unexpectedException();
419          }
420      }
# Line 436 | Line 436 | public class ReentrantLockTest extends J
436              assertTrue(lock.isLocked());
437              assertTrue(lock.isHeldByCurrentThread());
438              t.join();
439 <        } catch (Exception e){
439 >        } catch (Exception e) {
440              unexpectedException();
441          }
442      }
# Line 1141 | Line 1141 | public class ReentrantLockTest extends J
1141              ReentrantLock r = (ReentrantLock) in.readObject();
1142              r.lock();
1143              r.unlock();
1144 <        } catch (Exception e){
1144 >        } catch (Exception e) {
1145              e.printStackTrace();
1146              unexpectedException();
1147          }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines