From 377b2709c64b32fe93905b466482216c2cc0581c Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Wed, 19 Mar 2014 16:30:32 +0000
Subject: [PATCH] OPENDJ-1368 (CR-3232) Remove AttributeValue

---
 opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewIndexPanel.java |   20 +++++---------------
 1 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewIndexPanel.java b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewIndexPanel.java
index 2b066f9..d19b82e 100644
--- a/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewIndexPanel.java
+++ b/opendj3-server-dev/src/guitools/org/opends/guitools/controlpanel/ui/NewIndexPanel.java
@@ -69,7 +69,7 @@
 import org.opends.server.core.DirectoryServer;
 import org.opends.server.types.Attribute;
 import org.opends.server.types.AttributeType;
-import org.opends.server.types.AttributeValue;
+import org.forgerock.opendj.ldap.ByteString;
 import org.opends.server.types.DN;
 import org.opends.server.types.Entry;
 import org.opends.server.types.LDIFImportConfig;
@@ -81,7 +81,6 @@
 
 /**
  * Panel that appears when the user defines a new index.
- *
  */
 public class NewIndexPanel extends AbstractIndexPanel
 {
@@ -353,18 +352,9 @@
 
   private String getAttributeName()
   {
-    String attrName;
     CategorizedComboBoxElement o =
       (CategorizedComboBoxElement)attributes.getSelectedItem();
-    if (o != null)
-    {
-      attrName = o.getValue().toString();
-    }
-    else
-    {
-      attrName = null;
-    }
-    return attrName;
+    return o != null ? o.toString() : null;
   }
 
   /**
@@ -623,11 +613,11 @@
         Attributes attrs = new BasicAttributes();
 
         BasicAttribute oc = new BasicAttribute("objectClass");
-        Iterator<AttributeValue> it =
+        Iterator<ByteString> it =
           indexEntry.getObjectClassAttribute().iterator();
         while (it.hasNext())
         {
-          oc.add(it.next().getValue().toString());
+          oc.add(it.next().toString());
         }
         attrs.put(oc);
 
@@ -639,7 +629,7 @@
           it = odsAttr.iterator();
           while (it.hasNext())
           {
-            attr.add(it.next().getValue().toString());
+            attr.add(it.next().toString());
           }
           attrs.put(attr);
         }

--
Gitblit v1.10.0