From a632fbfad0ddbe8b343c6abe8e28dc41e3df9b7e Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 10 Jul 2015 10:16:25 +0000
Subject: [PATCH] Code cleanup

---
 opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java |   20 ++++----------------
 1 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java b/opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java
index 1000401..103d16d 100644
--- a/opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java
+++ b/opendj-server-legacy/src/main/java/org/opends/server/tools/ExportLDIF.java
@@ -579,14 +579,8 @@
       excludeAttributes = new HashSet<>();
       for (String attrName : excludeAttributeStrings.getValues())
       {
-        String        lowerName = attrName.toLowerCase();
-        AttributeType attrType  = DirectoryServer.getAttributeType(lowerName);
-        if (attrType == null)
-        {
-          attrType = DirectoryServer.getDefaultAttributeType(attrName);
-        }
-
-        excludeAttributes.add(attrType);
+        excludeAttributes.add(
+            DirectoryServer.getAttributeType(attrName.toLowerCase(), attrName));
       }
     }
 
@@ -600,14 +594,8 @@
       includeAttributes = new HashSet<>();
       for (String attrName : includeAttributeStrings.getValues())
       {
-        String        lowerName = attrName.toLowerCase();
-        AttributeType attrType  = DirectoryServer.getAttributeType(lowerName);
-        if (attrType == null)
-        {
-          attrType = DirectoryServer.getDefaultAttributeType(attrName);
-        }
-
-        includeAttributes.add(attrType);
+        includeAttributes.add(
+            DirectoryServer.getAttributeType(attrName.toLowerCase(), attrName));
       }
     }
 

--
Gitblit v1.10.0