From 83f86f11c27378d650c3bfc7e55397687062edbc Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 22 Apr 2016 14:23:28 +0000
Subject: [PATCH] Improvements suggested by UCDetector: remove dead code, add final keywords, change visibilities
---
opendj-server-legacy/src/main/java/org/opends/admin/ads/ServerDescriptor.java | 43 -------------------------------------------
1 files changed, 0 insertions(+), 43 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/admin/ads/ServerDescriptor.java b/opendj-server-legacy/src/main/java/org/opends/admin/ads/ServerDescriptor.java
index 8d18a05..2d33ddf 100644
--- a/opendj-server-legacy/src/main/java/org/opends/admin/ads/ServerDescriptor.java
+++ b/opendj-server-legacy/src/main/java/org/opends/admin/ads/ServerDescriptor.java
@@ -46,7 +46,6 @@
import org.opends.admin.ads.util.ConnectionUtils;
import org.opends.quicksetup.Constants;
import org.opends.server.config.ConfigConstants;
-import org.opends.server.schema.SchemaConstants;
import org.opends.server.types.HostPort;
/** The object of this class represent an OpenDS server. */
@@ -1281,48 +1280,6 @@
}
/**
- * Cleans up the contents of the ads truststore.
- *
- * @param ctx the bound instance.
- * @throws NamingException in case an error occurs while updating the
- * instance's ads-truststore via LDAP.
- */
- public static void cleanAdsTrustStore(InitialLdapContext ctx)
- throws NamingException
- {
- try
- {
- SearchControls sc = new SearchControls();
- sc.setSearchScope(SearchControls.ONELEVEL_SCOPE);
- sc.setReturningAttributes(new String[] { SchemaConstants.NO_ATTRIBUTES });
- NamingEnumeration<SearchResult> ne = ctx.search(TRUSTSTORE_DN,
- "(objectclass=ds-cfg-instance-key)", sc);
- ArrayList<String> dnsToDelete = new ArrayList<>();
- try
- {
- while (ne.hasMore())
- {
- SearchResult sr = ne.next();
- dnsToDelete.add(sr.getName()+","+TRUSTSTORE_DN);
- }
- }
- finally
- {
- ne.close();
- }
- for (String dn : dnsToDelete)
- {
- ctx.destroySubcontext(dn);
- }
- }
- catch (NameNotFoundException nnfe)
- {
- // Ignore
- logger.warn(LocalizableMessage.raw("Error cleaning truststore: "+nnfe, nnfe));
- }
- }
-
- /**
* Returns the values of the ds-base-dn-entry count attributes for the given
* backend monitor entry using the provided InitialLdapContext.
* @param ctx the InitialLdapContext to use to update the configuration.
--
Gitblit v1.10.0