From 45a05a46b927f19865e6a748873d70efe9a99ac5 Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 05 Aug 2016 18:41:17 +0000
Subject: [PATCH] Partial OPENDJ-2625 Convert all code that uses JNDI to use the SDK instead

---
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StatusGenericPanel.java |   18 ++++++++----------
 1 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StatusGenericPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StatusGenericPanel.java
index a9359a0..585376b 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StatusGenericPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/StatusGenericPanel.java
@@ -71,6 +71,7 @@
 import org.forgerock.i18n.LocalizableMessageBuilder;
 import org.forgerock.i18n.LocalizableMessageDescriptor;
 import org.forgerock.i18n.slf4j.LocalizedLogger;
+import org.forgerock.opendj.ldap.DN;
 import org.forgerock.opendj.ldap.LdapException;
 import org.forgerock.opendj.ldap.requests.SearchRequest;
 import org.forgerock.opendj.ldap.responses.SearchResultEntry;
@@ -1999,15 +2000,13 @@
   }
 
   /**
-   * Tells whether an entry exists or not. Actually it tells if we could find a
-   * given entry or not.
+   * Tells whether an entry exists or not. Actually it tells if we could find a given entry or not.
    *
    * @param dn
    *          the DN of the entry to look for.
-   * @return <CODE>true</CODE> if the entry with the provided DN could be found
-   *         and <CODE>false</CODE> otherwise.
+   * @return {@code true} if the entry with the provided DN could be found, {@code false} otherwise.
    */
-  protected boolean entryExists(final String dn)
+  protected boolean entryExists(final DN dn)
   {
     try
     {
@@ -2021,17 +2020,16 @@
   }
 
   /**
-   * Tells whether a given entry exists and contains one of the specified object
-   * classes.
+   * Tells whether a given entry exists and contains one of the specified object classes.
    *
    * @param dn
    *          the DN of the entry.
    * @param objectClasses
    *          the object classes to check.
-   * @return <CODE>true</CODE> if the entry exists and contains one of the
-   *         specified object classes and <CODE>false</CODE> otherwise.
+   * @return {@code true} if the entry exists and contains one of the specified object classes,
+   *         {@code false} otherwise.
    */
-  protected boolean hasObjectClass(final String dn, final String... objectClasses)
+  protected boolean hasObjectClass(final DN dn, final String... objectClasses)
   {
     SearchRequest request = newSearchRequest(dn, BASE_OBJECT, ALL_OBJECTS_FILTER, OBJECTCLASS_ATTRIBUTE_TYPE_NAME);
     try (ConnectionEntryReader entryReader = getInfo().getConnection().getConnection().search(request))

--
Gitblit v1.10.0