From ddc834f5aa8f311192cc419cf57b0648b4971b5b Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 09 Jun 2016 13:57:09 +0000
Subject: [PATCH] Entry.getAttribute() now accepts a nameOrOid

---
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyEntryTask.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyEntryTask.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyEntryTask.java
index 2bf90e0..39dc729 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyEntryTask.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/task/ModifyEntryTask.java
@@ -601,9 +601,8 @@
       }
       List<Object> oldValues = oldEntry.getAttributeValues(attrName);
       AttributeDescription attrDesc = AttributeDescription.valueOf(attrName);
-      String attrNoOptions = attrDesc.getNameOrOID().toLowerCase();
 
-      List<org.opends.server.types.Attribute> attrs = newEntry.getAttribute(attrNoOptions);
+      List<org.opends.server.types.Attribute> attrs = newEntry.getAttribute(attrDesc.getNameOrOID());
       if (!find(attrs, attrName) && !oldValues.isEmpty())
       {
         modifications.add(new ModificationItem(
@@ -616,6 +615,7 @@
 
   private static boolean find(List<org.opends.server.types.Attribute> attrs, String attrName)
   {
+    // TODO JNR use Entry.hasAttribute(AttributeDescription) instead?
     for (org.opends.server.types.Attribute attr : attrs)
     {
       if (attr.getAttributeDescription().toString().equalsIgnoreCase(attrName))

--
Gitblit v1.10.0