From 501935383f595362cf268a1df8e2b35c321bf118 Mon Sep 17 00:00:00 2001 From: Kanagaraj Manickam k00365106 Date: Tue, 6 Mar 2018 23:51:14 +0530 Subject: nteractive mode is broken Issue-ID: CLI-96 change-Id: Ie6b5551aa50e8c240e66bfd41073e03e45f4f49 Signed-off-by: Kanagaraj Manickam k00365106 --- main/pom.xml | 2 +- main/src/main/java/org/onap/cli/main/OnapCli.java | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) (limited to 'main') diff --git a/main/pom.xml b/main/pom.xml index 9e14e63c..3bfd447a 100644 --- a/main/pom.xml +++ b/main/pom.xml @@ -55,7 +55,7 @@ jline jline - 2.14.3 + 2.6 org.jmockit diff --git a/main/src/main/java/org/onap/cli/main/OnapCli.java b/main/src/main/java/org/onap/cli/main/OnapCli.java index 443b86f2..3f37faba 100644 --- a/main/src/main/java/org/onap/cli/main/OnapCli.java +++ b/main/src/main/java/org/onap/cli/main/OnapCli.java @@ -226,7 +226,6 @@ public class OnapCli { } else { try { OnapCommandRegistrar.getRegistrar().setEnabledProductVersion(args.get(1)); - console.close(); console = createConsoleReader(); } catch (OnapCommandException e) { this.print(e); @@ -287,9 +286,6 @@ public class OnapCli { TerminalFactory.get().restore(); } catch (Exception e) { // NOSONAR } - if (console != null) { - console.close(); - } this.exitSuccessfully(); } } @@ -303,7 +299,7 @@ public class OnapCli { * exception */ private ConsoleReader createConsoleReader() throws IOException { - try(ConsoleReader console = new ConsoleReader()){ + ConsoleReader console = new ConsoleReader(); // NOSONAR try { StringCompleter strCompleter = new StringCompleter(OnapCommandRegistrar.getRegistrar().listCommandsForEnabledProductVersion()); strCompleter.add(OnapCliConstants.PARAM_INTERACTIVE_EXIT, @@ -320,7 +316,6 @@ public class OnapCli { this.print("Failed to load oclip commands," + e.getMessage()); } return console; - } } /** -- cgit 1.2.3-korg