List of usage examples for java.lang IllegalMonitorStateException IllegalMonitorStateException
public IllegalMonitorStateException()
IllegalMonitorStateException
with no detail message. From source file:org.sonews.daemon.sync.SynchronousNNTPConnection.java
/** * Releases the read lock in a Thread-safe way. * * @throws IllegalMonitorStateException/* ww w. j a v a2 s . c o m*/ * if a Thread not holding the lock tries to release it. */ @Override public void unlockReadLock() { synchronized (readLockGate) { if (readLock == Thread.currentThread().hashCode()) { readLock = 0; } else { throw new IllegalMonitorStateException(); } } }