@Deprecated public void unlock(LockState<T> lockState){
  if (lockState == null) {
    throw new IllegalArgumentException("lockState is null");
  }
  if (lockState.setLock != this) {
    throw new IllegalArgumentException("The lockState passed was not from this instance");
  }
  if (lockState.thread != Thread.currentThread()) {
    throw new IllegalArgumentException("The thread that created this lockState is not the same as the one unlocking it");
  }
  threadSet.remove(Thread.currentThread());
  for (  ReentrantLock lock : lockState.locks) {
    lock.unlock();
  }
}

@ Deprecated public void unlock ( LockState < T > lockState ) { if ( lockState == null ) { throw new IllegalArgumentException ( "lockState is null" ) ; } if ( lockState . setLock != this ) { throw new IllegalArgumentException ( "The lockState passed was not from this instance" ) ; } if ( lockState . thread != Thread . currentThread ( ) ) { throw new IllegalArgumentException ( "The thread that created this lockState is not the same as the one unlocking it" ) ; } threadSet . remove ( Thread . currentThread ( ) ) ; for ( ReentrantLock lock : lockState . locks ) { lock . unlock ( ) ; } }
unlocks the objects acquired from locking . this method should always be in a finally block immediately after the lock . if you try to unlock from another thread , no objects are unlocked .
