switch (cre.getChangeOperationType()) {
case MODIFY:
LOG.log(Level.INFO, "proparing to modify " + dnByteString);
ModifyChangeRecordEntry mcre =
(ModifyChangeRecordEntry) cre;
ModifyOperation op =
cc.processModify(dnByteString, mcre.getModifications());
rc = op.getResultCode();
if (rc.equals(ResultCode.
SUCCESS)) {
LOG.log(Level.INFO, "processed server modification " +
modListToString(op.getModifications()));
} else if (rc.equals(
ResultCode.
ATTRIBUTE_OR_VALUE_EXISTS)) {
// ignore this error
LOG.log(Level.INFO, "ignoring attribute that already exists: " +
modListToString(op.getModifications()));
} else if (rc.equals(ResultCode.NO_SUCH_ATTRIBUTE)) {
// This can happen if for instance the old configuration was
// changed so that the value of an attribute matches the default
// value of the attribute in the new configuration.
// Just log it and move on.
LOG.log(Level.INFO, "Ignoring attribute not found: " +
modListToString(op.getModifications()));
} else {
// report the error to the user
MessageBuilder error = op.getErrorMessage();
throw new ApplicationException(
ReturnCode.IMPORT_ERROR,
INFO_ERROR_APPLY_LDIF_MODIFY.get(dnByteString.toString(),
error != null ? error.toString() : ""),
null);