@Test public void testDoubleWriteLock() { SimpleReadWriteLock lock = new SimpleReadWriteLock(); assertTrue(lock.tryWriteLock()); assertFalse(lock.tryWriteLock()); }
public synchronized boolean tryWriteLock() { if (!isFree()) { return false; } else { status = -1; return true; } }
SimpleReadWriteLock { public synchronized boolean tryWriteLock() { if (!isFree()) { return false; } else { status = -1; return true; } } }
SimpleReadWriteLock { public synchronized boolean tryWriteLock() { if (!isFree()) { return false; } else { status = -1; return true; } }  }
SimpleReadWriteLock { public synchronized boolean tryWriteLock() { if (!isFree()) { return false; } else { status = -1; return true; } }  synchronized boolean tryReadLock(); synchronized void releaseReadLock(); synchronized boolean tryWriteLock(); synchronized void releaseWriteLock(); }
SimpleReadWriteLock { public synchronized boolean tryWriteLock() { if (!isFree()) { return false; } else { status = -1; return true; } }  synchronized boolean tryReadLock(); synchronized void releaseReadLock(); synchronized boolean tryWriteLock(); synchronized void releaseWriteLock();  }