From 6c2dae79767257aa61c05c36189489861ca6f0f0 Mon Sep 17 00:00:00 2001
From: Violette Roche-Montane <violette.roche-montane@forgerock.com>
Date: Thu, 06 Mar 2014 14:37:45 +0000
Subject: [PATCH] Checkpoint OPENDJ-1343 Migrate dsconfig - Removed the PasswordReader class as now we only support >JDK6   - Replaced calls to PasswordReader.readPassword to ConsoleApplication.readPassword() - Minor code cleanup / removed unused on the SecureConnectionCli class.

---
 opendj3-server-dev/src/server/org/opends/server/util/args/LDAPConnectionArgumentParser.java |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/opendj3-server-dev/src/server/org/opends/server/util/args/LDAPConnectionArgumentParser.java b/opendj3-server-dev/src/server/org/opends/server/util/args/LDAPConnectionArgumentParser.java
index 430aec1..31f26a8 100644
--- a/opendj3-server-dev/src/server/org/opends/server/util/args/LDAPConnectionArgumentParser.java
+++ b/opendj3-server-dev/src/server/org/opends/server/util/args/LDAPConnectionArgumentParser.java
@@ -28,14 +28,18 @@
 package org.opends.server.util.args;
 
 import org.forgerock.i18n.LocalizableMessage;
+
 import static org.opends.messages.ToolMessages.*;
+
 import org.opends.server.tools.LDAPConnection;
 import org.opends.server.tools.LDAPConnectionOptions;
 import org.opends.server.tools.SSLConnectionFactory;
 import org.opends.server.tools.SSLConnectionException;
 import org.opends.server.tools.LDAPConnectionException;
+
 import static org.opends.server.util.ServerConstants.MAX_LINE_WIDTH;
 import static org.opends.server.util.StaticUtils.wrapText;
+
 import org.opends.server.util.cli.LDAPConnectionConsoleInteraction;
 import org.opends.server.admin.client.cli.SecureConnectionCliArgs;
 import org.opends.server.types.OpenDsException;
@@ -44,6 +48,7 @@
 import com.forgerock.opendj.cli.ArgumentException;
 import com.forgerock.opendj.cli.ArgumentParser;
 import com.forgerock.opendj.cli.ArgumentGroup;
+import com.forgerock.opendj.cli.ConsoleApplication;
 import com.forgerock.opendj.cli.FileBasedArgument;
 import com.forgerock.opendj.cli.StringArgument;
 
@@ -51,12 +56,12 @@
 import java.util.LinkedHashSet;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.io.PrintStream;
+
 import javax.net.ssl.SSLException;
-import org.opends.server.util.PasswordReader;
 
 /**
  * Creates an argument parser pre-populated with arguments for specifying
- * information for openning and LDAPConnection an LDAP connection.
+ * information for opening and LDAPConnection an LDAP connection.
  */
 public class LDAPConnectionArgumentParser extends ArgumentParser {
 
@@ -498,7 +503,7 @@
       try
       {
         out.print(INFO_LDAPAUTH_PASSWORD_PROMPT.get(bindDN));
-        char[] pwChars = PasswordReader.readPassword();
+        char[] pwChars = ConsoleApplication.readPassword();
         pwd = new String(pwChars);
         //As per rfc 4513(section-5.1.2) a client should avoid sending
         //an empty password to the server.
@@ -508,7 +513,7 @@
                   INFO_LDAPAUTH_NON_EMPTY_PASSWORD.get(),
                   MAX_LINE_WIDTH));
           out.print(INFO_LDAPAUTH_PASSWORD_PROMPT.get(bindDN));
-          pwChars = PasswordReader.readPassword();
+          pwChars = ConsoleApplication.readPassword();
         }
         pwd = new String(pwChars);
       } catch(Exception ex)

--
Gitblit v1.10.0