mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

jvergara
19.26.2008 c774da7ff96766fef933e7cad709a840a244b5cc
Fix for issue 2970 (Off-line  export-ldif -n replicationChanges shouldn't return '0')

Make the code to return a error 1 if there is a problem with the export
1 files modified
16 ■■■■ changed files
opendj-sdk/opends/src/server/org/opends/server/tools/ExportLDIF.java 16 ●●●● patch | view | raw | blame | history
opendj-sdk/opends/src/server/org/opends/server/tools/ExportLDIF.java
@@ -957,7 +957,7 @@
        Message message = ERR_LDIFEXPORT_CANNOT_LOCK_BACKEND.get(
            backend.getBackendID(), String.valueOf(failureReason));
        logError(message);
        return 0;
        return 1;
      }
    }
    catch (Exception e)
@@ -965,9 +965,10 @@
      Message message = ERR_LDIFEXPORT_CANNOT_LOCK_BACKEND.get(
          backend.getBackendID(), getExceptionMessage(e));
      logError(message);
      return 0;
      return 1;
    }
    boolean errorOccurred = false;
    // Launch the export.
    try
@@ -979,12 +980,14 @@
      Message message =
          ERR_LDIFEXPORT_ERROR_DURING_EXPORT.get(de.getMessageObject());
      logError(message);
      errorOccurred = true;
    }
    catch (Exception e)
    {
      Message message =
          ERR_LDIFEXPORT_ERROR_DURING_EXPORT.get(getExceptionMessage(e));
      logError(message);
      errorOccurred = true;
    }
@@ -1010,7 +1013,14 @@
    // Clean up after the export by closing the export config.
    exportConfig.close();
    return 0;
    if (!errorOccurred)
    {
      return 0;
    }
    else
    {
      return 1;
    }
  }
}