--- jsr166/src/test/tck/ReentrantLockTest.java 2003/12/28 21:56:18 1.13 +++ jsr166/src/test/tck/ReentrantLockTest.java 2003/12/28 22:44:59 1.14 @@ -481,6 +481,50 @@ public class ReentrantLockTest extends J } /** + * hasWaiters throws NPE if null + */ + public void testHasWaitersNPE() { + final ReentrantLock lock = new ReentrantLock(); + try { + lock.hasWaiters(null); + shouldThrow(); + } catch (NullPointerException success) { + } catch (Exception ex) { + unexpectedException(); + } + } + + /** + * getWaitQueueLength throws NPE if null + */ + public void testGetWaitQueueLengthNPE() { + final ReentrantLock lock = new ReentrantLock(); + try { + lock.getWaitQueueLength(null); + shouldThrow(); + } catch (NullPointerException success) { + } catch (Exception ex) { + unexpectedException(); + } + } + + + /** + * getWaitingThreads throws NPE if null + */ + public void testGetWaitingThreadsNPE() { + final PublicReentrantLock lock = new PublicReentrantLock(); + try { + lock.getWaitingThreads(null); + shouldThrow(); + } catch (NullPointerException success) { + } catch (Exception ex) { + unexpectedException(); + } + } + + + /** * hasWaiters throws IAE if not owned */ public void testHasWaitersIAE() {