summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;
- }
}
/**