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

Yannick Lecaillez
05.59.2016 fc6ff5cd4f579042078b4103af7931804895f344
opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java
@@ -90,7 +90,6 @@
  private boolean overwrite;
  private boolean skipSchemaValidation;
  private boolean clearBackend;
  private boolean skipDNValidation;
  private String tmpDirectory;
  private int threadCount;
  private String backendID;
@@ -153,7 +152,6 @@
    AttributeType typeRandomSeed = getSchema().getAttributeType(ATTR_IMPORT_RANDOM_SEED);
    AttributeType typeThreadCount = getSchema().getAttributeType(ATTR_IMPORT_THREAD_COUNT);
    AttributeType typeTmpDirectory = getSchema().getAttributeType(ATTR_IMPORT_TMP_DIRECTORY);
    AttributeType typeDNCheckPhase2 = getSchema().getAttributeType(ATTR_IMPORT_SKIP_DN_VALIDATION);
    ArrayList<String> ldifFilestmp = asListOfStrings(taskEntry, typeLdifFile);
    ldifFiles = new ArrayList<>(ldifFilestmp.size());
@@ -189,7 +187,6 @@
      }
    }
    skipDNValidation = asBoolean(taskEntry, typeDNCheckPhase2);
    tmpDirectory = asString(taskEntry, typeTmpDirectory);
    backendID = asString(taskEntry, typeBackendID);
    includeBranchStrings = asListOfStrings(taskEntry, typeIncludeBranch);
@@ -581,7 +578,6 @@
    importConfig.setIncludeBranches(includeBranches);
    importConfig.setIncludeFilters(includeFilters);
    importConfig.setValidateSchema(!skipSchemaValidation);
    importConfig.setSkipDNValidation(skipDNValidation);
    importConfig.setTmpDirectory(tmpDirectory);
    importConfig.setThreadCount(threadCount);
@@ -669,16 +665,7 @@
        logger.traceException(de);
        DirectoryServer.notifyImportEnded(backend, importConfig, false);
        LocalizableMessage msg;
        if (de.getResultCode() == ResultCode.CONSTRAINT_VIOLATION)
        {
          msg = ERR_LDIFIMPORT_ERROR_CONSTRAINT_VIOLATION.get();
        }
        else
        {
          msg = de.getMessageObject();
        }
        logger.error(ERR_LDIFIMPORT_ERROR_DURING_IMPORT.get(msg));
        logger.error(ERR_LDIFIMPORT_ERROR_DURING_IMPORT.get(de.getMessageObject()));
        return TaskState.STOPPED_BY_ERROR;
      }
      catch (Exception e)