diff --git a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java index c9297b973e..3d5911a303 100644 --- a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java +++ b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/messages/ConnectionAbstract.java @@ -226,14 +226,16 @@ public class ConnectionAbstract extends InputAbstract { private String inputUser(String user) { if (user == null) { this.user = input("--user", "Type the username for a retry", null); + return this.user; } - return this.user; + return user; } private String inputPassword(String password) { if (password == null) { this.password = inputPassword("--password", "Type the password for a retry", null); + return this.password; } - return this.password; + return password; } }