From a3529e8d0ca9206b9bef2c6dba418ca20ad06e8a Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Tue, 01 Apr 2014 09:11:13 +0000
Subject: [PATCH] OPENDJ-1303 Split out CLI support from opendj-ldap-toolkit into a separate Maven module, "opendj-cli" - Replaced ConnectionUtils.getDefaultLDAPTimeout() by CliConstants.DEFAULT_LDAP_CONNECT_TIMEOUT; - LDAPManagementContextFactory.java : code cleanup - removed unused code.
---
opendj3-server-dev/src/ads/org/opends/admin/ads/util/ConnectionUtils.java | 28 ++++++++--------------------
1 files changed, 8 insertions(+), 20 deletions(-)
diff --git a/opendj3-server-dev/src/ads/org/opends/admin/ads/util/ConnectionUtils.java b/opendj3-server-dev/src/ads/org/opends/admin/ads/util/ConnectionUtils.java
index 61cb3a5..15cdb39 100644
--- a/opendj3-server-dev/src/ads/org/opends/admin/ads/util/ConnectionUtils.java
+++ b/opendj3-server-dev/src/ads/org/opends/admin/ads/util/ConnectionUtils.java
@@ -64,8 +64,6 @@
*/
public class ConnectionUtils
{
- private static final int DEFAULT_LDAP_CONNECT_TIMEOUT = 30000;
-
private static final String STARTTLS_PROPERTY =
"org.opends.connectionutils.isstarttls";
@@ -742,24 +740,14 @@
}
/**
- * Returns the default LDAP timeout in milliseconds when we try to connect to
- * a server.
- * @return the default LDAP timeout in milliseconds when we try to connect to
- * a server.
- */
- public static int getDefaultLDAPTimeout()
- {
- return DEFAULT_LDAP_CONNECT_TIMEOUT;
- }
-
- /**
* Returns the String that can be used to represent a given host name in a
- * LDAP URL.
- * This method must be used when we have IPv6 addresses (the address in the
- * LDAP URL must be enclosed with brackets).
- * @param host the host name.
- * @return the String that can be used to represent a given host name in a
- * LDAP URL.
+ * LDAP URL. This method must be used when we have IPv6 addresses (the address
+ * in the LDAP URL must be enclosed with brackets).
+ *
+ * @param host
+ * The host name.
+ * @return The String that can be used to represent a given host name in a
+ * LDAP URL.
*/
public static String getHostNameForLdapUrl(String host)
{
@@ -770,7 +758,7 @@
host = host.trim();
if (!host.startsWith("["))
{
- host = "["+host;
+ host = "[" + host;
}
if (!host.endsWith("]"))
{
--
Gitblit v1.10.0