private void setCollectingMode(boolean collectInfo, boolean collectError) {
    collectingCertificateInfo = collectInfo;
    collectingCertificateError = collectError;

    if (collectingCertificateInfo) {
      certificateInfo.setLength(0);
    }

    if (collectingCertificateError) {
      certificateError.setLength(0);
    }
  }
private void setCollectingMode(boolean collectInfo, boolean collectError)