summaryrefslogtreecommitdiffstats
path: root/main/src
diff options
context:
space:
mode:
authorKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-06 23:51:14 +0530
committerKanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>2018-03-06 23:51:14 +0530
commit501935383f595362cf268a1df8e2b35c321bf118 (patch)
tree1695d8f7c6ae14b5b6a61ccdb71eb77552e9b163 /main/src
parent24cfb23199a4443baf3c54e36992acb07c2fe45c (diff)
nteractive mode is broken
Issue-ID: CLI-96 change-Id: Ie6b5551aa50e8c240e66bfd41073e03e45f4f49 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
Diffstat (limited to 'main/src')
-rw-r--r--main/src/main/java/org/onap/cli/main/OnapCli.java7
1 files changed, 1 insertions, 6 deletions
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;
- }
}
/**