aboutsummaryrefslogtreecommitdiffstats
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
parent24cfb23199a4443baf3c54e36992acb07c2fe45c (diff)
nteractive mode is broken
Issue-ID: CLI-96 change-Id: Ie6b5551aa50e8c240e66bfd41073e03e45f4f49 Signed-off-by: Kanagaraj Manickam k00365106 <kanagaraj.manickam@huawei.com>
-rw-r--r--main/pom.xml2
-rw-r--r--main/src/main/java/org/onap/cli/main/OnapCli.java7
2 files changed, 2 insertions, 7 deletions
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 @@
<dependency>
<groupId>jline</groupId>
<artifactId>jline</artifactId>
- <version>2.14.3</version>
+ <version>2.6</version>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
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;
- }
}
/**