From b6f56ad982efe9bdf5fb89bce8c3294435b0af8c Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Thu, 23 Oct 2014 14:00:36 +0000
Subject: [PATCH] Big code cleanup of ReplicationCliMain
---
opendj3-server-dev/src/ads/org/opends/admin/ads/util/ConnectionUtils.java | 30 +++---------------------------
1 files changed, 3 insertions(+), 27 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 072d4eb..c3c3a69 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
@@ -30,14 +30,10 @@
import java.io.IOException;
import java.net.ConnectException;
import java.net.URI;
-import java.security.GeneralSecurityException;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Set;
-import org.forgerock.i18n.LocalizableMessage;
-import org.forgerock.i18n.slf4j.LocalizedLogger;
-
import javax.naming.CommunicationException;
import javax.naming.Context;
import javax.naming.NamingEnumeration;
@@ -52,9 +48,10 @@
import javax.naming.ldap.StartTlsResponse;
import javax.net.ssl.HostnameVerifier;
import javax.net.ssl.KeyManager;
-import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.TrustManager;
+import org.forgerock.i18n.LocalizableMessage;
+import org.forgerock.i18n.slf4j.LocalizedLogger;
import org.opends.server.replication.plugin.EntryHistorical;
import org.opends.server.schema.SchemaConstants;
@@ -221,6 +218,7 @@
final KeyManager fKeyManager = keyManager;
Thread t = new Thread(new Runnable() {
+ @Override
public void run() {
try {
TrustedSocketFactory.setCurrentThreadTrustManager(fTrustManager,
@@ -798,28 +796,6 @@
}
/**
- * Tells whether the provided Throwable was caused because of a problem with
- * a certificate while trying to establish a connection.
- * @param t the Throwable to analyze.
- * @return <CODE>true</CODE> if the provided Throwable was caused because of a
- * problem with a certificate while trying to establish a connection and
- * <CODE>false</CODE> otherwise.
- */
- public static boolean isCertificateException(Throwable t)
- {
- boolean returnValue = false;
-
- while (!returnValue && (t != null))
- {
- returnValue = (t instanceof SSLHandshakeException) ||
- (t instanceof GeneralSecurityException);
- t = t.getCause();
- }
-
- return returnValue;
- }
-
- /**
* Returns the String representation of the first value of an attribute in a
* LDAP entry.
* @param entry the entry.
--
Gitblit v1.10.0