mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Violette Roche-Montane
29.57.2014 8f434776744e26ae11fe4d7e395837f62461dc59
opendj-ldap-toolkit/src/main/java/com/forgerock/opendj/ldap/tools/ConnectionFactoryProvider.java
@@ -22,12 +22,11 @@
 *
 *
 *      Copyright 2010 Sun Microsystems, Inc.
 *      Portions copyright 2011-2013 ForgeRock AS
 *      Portions copyright 2011-2014 ForgeRock AS
 */
package com.forgerock.opendj.ldap.tools;
import static com.forgerock.opendj.ldap.tools.ToolConstants.*;
import static com.forgerock.opendj.cli.CliConstants.*;
import static com.forgerock.opendj.ldap.tools.ToolsMessages.*;
import java.io.File;
@@ -47,6 +46,16 @@
import javax.net.ssl.X509TrustManager;
import org.forgerock.i18n.LocalizableMessage;
import com.forgerock.opendj.cli.ArgumentException;
import com.forgerock.opendj.cli.ArgumentParser;
import com.forgerock.opendj.cli.BooleanArgument;
import com.forgerock.opendj.cli.CLIException;
import com.forgerock.opendj.cli.ConsoleApplication;
import com.forgerock.opendj.cli.FileBasedArgument;
import com.forgerock.opendj.cli.IntegerArgument;
import com.forgerock.opendj.cli.StringArgument;
import org.forgerock.opendj.ldap.ConnectionFactory;
import org.forgerock.opendj.ldap.KeyManagers;
import org.forgerock.opendj.ldap.LDAPConnectionFactory;
@@ -68,11 +77,6 @@
 */
final class ConnectionFactoryProvider {
    /**
     * End Of Line.
     */
    static final String EOL = System.getProperty("line.separator");
    /**
     * The Logger.
     */
    static final Logger LOG = Logger.getLogger(ConnectionFactoryProvider.class.getName());
@@ -353,8 +357,8 @@
                throw new ArgumentException(message);
            }
            // Couldn't have at the same time trustAll and
            // trustStore related arg
            /* Couldn't have at the same time trustAll and
             trustStore related arg*/
            if (trustAllArg.isPresent() && trustStorePathArg.isPresent()) {
                final LocalizableMessage message =
                        ERR_TOOL_CONFLICTING_ARGS.get(trustAllArg.getLongIdentifier(),
@@ -374,8 +378,8 @@
                throw new ArgumentException(message);
            }
            // Couldn't have at the same time trustStorePasswordArg and
            // trustStorePasswordFileArg
            /* Couldn't have at the same time trustStorePasswordArg and
             trustStorePasswordFileArg*/
            if (trustStorePasswordArg.isPresent() && trustStorePasswordFileArg.isPresent()) {
                final LocalizableMessage message =
                        ERR_TOOL_CONFLICTING_ARGS.get(trustStorePasswordArg.getLongIdentifier(),
@@ -401,8 +405,7 @@
                }
            }
            // Couldn't have at the same time startTLSArg and
            // useSSLArg
            // Couldn't have at the same time startTLSArg and useSSLArg
            if (useStartTLSArg.isPresent() && useSSLArg.isPresent()) {
                final LocalizableMessage message =
                        ERR_TOOL_CONFLICTING_ARGS.get(useStartTLSArg.getLongIdentifier(), useSSLArg