mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Jean-Noël Rouvignac
17.11.2015 14f94c13789b8ace4eae258b5f1d64494518f9c3
opendj-server-legacy/src/main/java/org/opends/server/admin/AdministrationDataSync.java
@@ -26,6 +26,8 @@
 */
package org.opends.server.admin;
import static org.opends.server.protocols.internal.Requests.*;
import java.net.InetAddress;
import java.util.LinkedList;
import java.util.List;
@@ -48,8 +50,6 @@
import org.opends.server.types.Modification;
import org.opends.server.types.SearchResultEntry;
import static org.opends.server.protocols.internal.Requests.*;
/**
 * Check if information found in "cn=admin data" is coherent with
 * cn=config. If and inconsistency is detected, we log a warning
@@ -259,14 +259,12 @@
    AttributeType attrType = DirectoryServer.getAttributeTypeOrDefault(attrName);
    List<Attribute> attrs = adminConnectorEntry.getAttribute(attrType);
    if (attrs != null)
    if (!attrs.isEmpty())
    {
      // Get the attribute value
      return attrs.get(0).iterator().next().toString();
    }
    // can not happen
    // best effort.
    // Can not happen. Best effort.
    // TODO Log an Error.
    return null;
  }