From 714b57c8ad2c6eab6e518f3f4888c9d83996e41c Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 18 Apr 2016 13:49:37 +0000
Subject: [PATCH] Code cleanup
---
opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ConnectionUtils.java | 37 -------------------------------------
1 files changed, 0 insertions(+), 37 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ConnectionUtils.java b/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ConnectionUtils.java
index f305c4a..8a3a55f 100644
--- a/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ConnectionUtils.java
+++ b/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ConnectionUtils.java
@@ -480,44 +480,7 @@
return "true".equalsIgnoreCase(getEnvProperty(ctx, STARTTLS_PROPERTY));
}
- /**
- * Method used to know if we can connect as administrator in a server with a
- * given password and dn.
- * @param ldapUrl the LDAP URL of the server.
- * @param dn the dn to be used.
- * @param pwd the password to be used.
- * @param timeout the timeout to establish the connection in milliseconds.
- * Use {@code 0} to express no timeout.
- * @return <CODE>true</CODE> if we can connect and read the configuration and
- * <CODE>false</CODE> otherwise.
- */
- public static boolean canConnectAsAdministrativeUser(String ldapUrl,
- String dn, String pwd, int timeout)
- {
- try
- {
- InitialLdapContext ctx;
- if (ldapUrl.toLowerCase().startsWith("ldap:"))
- {
- ctx = createLdapContext(ldapUrl, dn, pwd, timeout,
- null);
- }
- else
- {
- ctx = createLdapsContext(ldapUrl, dn, pwd, timeout,
- null, null, null);
- }
- return connectedAsAdministrativeUser(ctx);
- } catch (NamingException ne)
- {
- // Nothing to do.
- return false;
- } catch (Throwable t)
- {
- throw new IllegalStateException("Unexpected throwable.", t);
- }
- }
/**
* Method used to know if we are connected as administrator in a server with a
--
Gitblit v1.10.0