private void setError(Error error) {
    Preconditions.checkNotNull(error, "error");
    try (LockResource lr = new LockResource(mLock)) {
      if (mContext == null || mContext.getError() != null || mContext.isDoneUnsafe()) {
        // Note, we may reach here via channelUnregistered due to network errors bubbling up before
        // mContext is initialized, or channel garbage collection after the request is finished.
        return;
      }
      mContext.setError(error);
      if (!mContext.isDataReaderActive()) {
        mContext.setDataReaderActive(true);
        mDataReaderExecutor.submit(createDataReader(mContext, mResponseObserver));
      }
    }
  }
private void setError ( Error error ) { Preconditions . checkNotNull ( error , "error" ) ; try ( LockResource lr = new LockResource ( mLock ) ) { if ( mContext == null || mContext . getError ( ) != null || mContext . isDoneUnsafe ( ) ) { return ; } mContext . setError ( error ) ; if ( ! mContext . isDataReaderActive ( ) ) { mContext . setDataReaderActive ( true ) ; mDataReaderExecutor . submit ( createDataReader ( mContext , mResponseObserver ) ) ; } } }
@param error the error