Class CloseableReadWriteLock.ReadLock

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void avoidCompilerWarning()
      This method does nothing.
      void close()
      Unlocks the associated lock.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • avoidCompilerWarning

        public void avoidCompilerWarning()
        This method does nothing. However, calling it inside a try block when used in the try-with-resources framework can help avoid a compiler warning that the JVM will give you if you don't reference the Closeable object inside the try block.
      • close

        public void close()
        Unlocks the associated lock.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable