From a12eb578b2b06f6ba9d929f4a2c7b81e13eae7cc Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 01 Jul 2016 14:30:12 +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/admin/ads/util/ServerLoader.java | 16 +++++++++-------
1 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ServerLoader.java b/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ServerLoader.java
index 9c5f690..db26534 100644
--- a/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ServerLoader.java
+++ b/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/ServerLoader.java
@@ -16,6 +16,8 @@
*/
package org.opends.admin.ads.util;
+import static org.opends.admin.ads.util.PreferredConnection.Type.*;
+
import java.util.LinkedHashSet;
import java.util.Map;
import java.util.Set;
@@ -379,17 +381,17 @@
ldapUrls.add(connection);
}
else if (url.equalsIgnoreCase(ldapsUrl) &&
- connection.getType() == PreferredConnection.Type.LDAPS)
+ connection.getType() == LDAPS)
{
ldapUrls.add(connection);
}
else if (url.equalsIgnoreCase(startTLSUrl) &&
- connection.getType() == PreferredConnection.Type.START_TLS)
+ connection.getType() == START_TLS)
{
ldapUrls.add(connection);
}
else if (url.equalsIgnoreCase(ldapUrl) &&
- connection.getType() == PreferredConnection.Type.LDAP)
+ connection.getType() == LDAP)
{
ldapUrls.add(connection);
}
@@ -397,19 +399,19 @@
if (adminConnectorUrl != null)
{
- ldapUrls.add(new PreferredConnection(adminConnectorUrl, PreferredConnection.Type.LDAPS));
+ ldapUrls.add(new PreferredConnection(adminConnectorUrl, LDAPS));
}
if (ldapsUrl != null)
{
- ldapUrls.add(new PreferredConnection(ldapsUrl, PreferredConnection.Type.LDAPS));
+ ldapUrls.add(new PreferredConnection(ldapsUrl, LDAPS));
}
if (startTLSUrl != null)
{
- ldapUrls.add(new PreferredConnection(startTLSUrl, PreferredConnection.Type.START_TLS));
+ ldapUrls.add(new PreferredConnection(startTLSUrl, START_TLS));
}
if (ldapUrl != null)
{
- ldapUrls.add(new PreferredConnection(ldapUrl, PreferredConnection.Type.LDAP));
+ ldapUrls.add(new PreferredConnection(ldapUrl, LDAP));
}
return ldapUrls;
}
--
Gitblit v1.10.0