From a3c93828f847345ed67fda0cddf1089d8fb433d5 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 07 Mar 2016 15:04:03 +0000
Subject: [PATCH] OPENDJ-1342 Migrate AVA, RDN, and DN classes: DirectoryException => LocalizedIllegalArgumentException

---
 opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java |   26 ++------------------------
 1 files changed, 2 insertions(+), 24 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java b/opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java
index f90eeea..d55a6eb 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tasks/ImportTask.java
@@ -33,7 +33,9 @@
 
 import org.forgerock.i18n.LocalizableMessage;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
+import org.forgerock.opendj.ldap.DN;
 import org.forgerock.opendj.ldap.ResultCode;
+import org.forgerock.opendj.ldap.schema.AttributeType;
 import org.opends.messages.Severity;
 import org.opends.messages.TaskMessages;
 import org.opends.server.api.Backend;
@@ -45,8 +47,6 @@
 import org.opends.server.core.LockFileManager;
 import org.opends.server.tools.makeldif.TemplateFile;
 import org.opends.server.types.Attribute;
-import org.forgerock.opendj.ldap.schema.AttributeType;
-import org.forgerock.opendj.ldap.DN;
 import org.opends.server.types.DirectoryException;
 import org.opends.server.types.Entry;
 import org.opends.server.types.ExistingFileBehavior;
@@ -232,12 +232,6 @@
       {
         includeBranch = DN.valueOf(s);
       }
-      catch (DirectoryException de)
-      {
-        LocalizableMessage message = ERR_LDIFIMPORT_CANNOT_DECODE_INCLUDE_BASE.get(
-            s, de.getMessageObject());
-        throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
-      }
       catch (Exception e)
       {
         LocalizableMessage message = ERR_LDIFIMPORT_CANNOT_DECODE_INCLUDE_BASE.get(
@@ -254,12 +248,6 @@
       {
         excludeBranch = DN.valueOf(s);
       }
-      catch (DirectoryException de)
-      {
-        LocalizableMessage message = ERR_LDIFIMPORT_CANNOT_DECODE_EXCLUDE_BASE.get(
-            s, de.getMessageObject());
-        throw new DirectoryException(ResultCode.UNWILLING_TO_PERFORM, message);
-      }
       catch (Exception e)
       {
         LocalizableMessage message = ERR_LDIFIMPORT_CANNOT_DECODE_EXCLUDE_BASE.get(
@@ -448,11 +436,6 @@
       {
         includeBranch = DN.valueOf(s);
       }
-      catch (DirectoryException de)
-      {
-        logger.error(ERR_LDIFIMPORT_CANNOT_DECODE_INCLUDE_BASE, s, de.getMessageObject());
-        return TaskState.STOPPED_BY_ERROR;
-      }
       catch (Exception e)
       {
         logger.error(ERR_LDIFIMPORT_CANNOT_DECODE_INCLUDE_BASE, s, getExceptionMessage(e));
@@ -528,11 +511,6 @@
       {
         excludeBranch = DN.valueOf(s);
       }
-      catch (DirectoryException de)
-      {
-        logger.error(ERR_LDIFIMPORT_CANNOT_DECODE_EXCLUDE_BASE, s, de.getMessageObject());
-        return TaskState.STOPPED_BY_ERROR;
-      }
       catch (Exception e)
       {
         logger.error(ERR_LDIFIMPORT_CANNOT_DECODE_EXCLUDE_BASE, s, getExceptionMessage(e));

--
Gitblit v1.10.0