From 5b498b0ef16a5ffdfa7ebb5ae1bf90b5299db49e Mon Sep 17 00:00:00 2001
From: Jean-Noël Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Mon, 18 Apr 2016 12:31:13 +0000
Subject: [PATCH] Removed InitialLdapContext import from ReplicationCliMain. Used ConnectionWrapper instead
---
opendj-server-legacy/src/main/java/org/opends/admin/ads/util/PreferredConnection.java | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/PreferredConnection.java b/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/PreferredConnection.java
index 08d4bf9..855b7f6 100644
--- a/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/PreferredConnection.java
+++ b/opendj-server-legacy/src/main/java/org/opends/admin/ads/util/PreferredConnection.java
@@ -96,11 +96,12 @@
/**
* Commodity method that returns a PreferredConnection object with the
* information on a given InitialLdapContext.
- * @param ctx the connection we retrieve the information from.
+ * @param conn the connection we retrieve the information from.
* @return a preferred connection object.
*/
- public static PreferredConnection getPreferredConnection(InitialLdapContext ctx)
+ public static PreferredConnection getPreferredConnection(ConnectionWrapper conn)
{
+ InitialLdapContext ctx = conn.getLdapContext();
String ldapUrl = ConnectionUtils.getLdapUrl(ctx);
PreferredConnection.Type type;
if (ConnectionUtils.isStartTLS(ctx))
@@ -121,11 +122,11 @@
/**
* Commodity method that generates a list of preferred connection (of just
* one) with the information on a given InitialLdapContext.
- * @param ctx the connection we retrieve the information from.
+ * @param conn the connection we retrieve the information from.
* @return a list containing the preferred connection object.
*/
- public static Set<PreferredConnection> getPreferredConnections(InitialLdapContext ctx)
+ public static Set<PreferredConnection> getPreferredConnections(ConnectionWrapper conn)
{
- return Collections.singleton(getPreferredConnection(ctx));
+ return Collections.singleton(getPreferredConnection(conn));
}
}
--
Gitblit v1.10.0