directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From smckin...@apache.org
Subject [directory-fortress-core] branch FC-238 updated: console function doesn't work when testing in IDE
Date Wed, 23 Jun 2021 19:45:30 GMT
This is an automated email from the ASF dual-hosted git repository.

smckinney pushed a commit to branch FC-238
in repository https://gitbox.apache.org/repos/asf/directory-fortress-core.git


The following commit(s) were added to refs/heads/FC-238 by this push:
     new 36e8249  console function doesn't work when testing in IDE
36e8249 is described below

commit 36e8249420718c6dc6acbbf0c228d2154bad6fc0
Author: Shawn McKinney <smckinney@symas.com>
AuthorDate: Wed Jun 23 14:45:23 2021 -0500

    console function doesn't work when testing in IDE
---
 .../java/org/apache/directory/fortress/core/AccessMgrConsole.java | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

diff --git a/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java b/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java
index 6815d14..b4b729d 100755
--- a/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java
+++ b/src/test/java/org/apache/directory/fortress/core/AccessMgrConsole.java
@@ -19,7 +19,6 @@
  */
 package org.apache.directory.fortress.core;
 
-import java.io.Console;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.Comparator;
@@ -150,9 +149,8 @@ class AccessMgrConsole
             ReaderUtil.clearScreen();
             System.out.println("Enter userId:");
             String userId = ReaderUtil.readLn();
-            Console console = System.console();
             System.out.println("Enter password:");
-            String password = new String ( console.readPassword() );
+            String password = ReaderUtil.readLn();
             session = am.authenticate(userId, password);
             System.out.println("Authentication successful for userId [" + userId + "]");
             System.out.println("session [" + session + "]");
@@ -174,9 +172,7 @@ class AccessMgrConsole
             System.out.println("Enter userId:");
             String userId = ReaderUtil.readLn();
             System.out.println("Enter password:");
-            Console console = System.console();
-            String password = new String ( console.readPassword() );
-
+            String password = ReaderUtil.readLn();
             User inUser = new User(userId, password);
             List<RoleConstraint> constraints = new ArrayList();
             RoleConstraint constraint = getRuntimeConstraint( inUser );

Mime
View raw message