catch (InterruptedException ex) { throw new Error("Interrupted during grab read lock"); }
  public final void readLock()  {    if (currentWriter != null && currentWriter.equals(Thread.currentThread()))      return;    synchronized (documentCV)      {        while (currentWriter != null || numWritersWaiting > 0)          {                        try              {                documentCV.wait();              }            catch (InterruptedException ie)              {                throw new Error("interrupted trying to get a readLock");              }          }          numReaders++;      }  }