} finally { writeUnlock(); }
  public void replace(int offset, int length, String text,		      AttributeSet attributes)    throws BadLocationException  {    // Bail out if we have a bogus replacement (Behavior observed in RI).    if (length == 0         && (text == null || text.length() == 0))      return;        if (documentFilter == null)      {        // It is important to call the methods which again do the checks        // of the arguments and the DocumentFilter because subclasses may        // have overridden these methods and provide crucial behavior        // which would be skipped if we call the non-checking variants.        // An example for this is PlainDocument where insertString can        // provide a filtering of newlines.        remove(offset, length);        insertString(offset, text, attributes);      }    else      documentFilter.replace(getBypass(), offset, length, text, attributes);      }