From e2a351cb706b384ea789379eba34418f09fb0633 Mon Sep 17 00:00:00 2001 From: Michele Sollecito Date: Tue, 13 Nov 2018 10:44:04 +0000 Subject: [PATCH] [CORDA-2123]: Unhandled IndexOutOfBoundsException for malformed Shell commands. (fix) (#4225) --- .../main/kotlin/net/corda/tools/shell/InteractiveShell.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/shell/src/main/kotlin/net/corda/tools/shell/InteractiveShell.kt b/tools/shell/src/main/kotlin/net/corda/tools/shell/InteractiveShell.kt index 55109ff233..8ed572a14a 100644 --- a/tools/shell/src/main/kotlin/net/corda/tools/shell/InteractiveShell.kt +++ b/tools/shell/src/main/kotlin/net/corda/tools/shell/InteractiveShell.kt @@ -128,7 +128,11 @@ object InteractiveShell { InterruptHandler { jlineProcessor.interrupt() }.install() thread(name = "Command line shell processor", isDaemon = true) { Emoji.renderIfSupported { - jlineProcessor.run() + try { + jlineProcessor.run() + } catch (e: IndexOutOfBoundsException) { + log.warn("Cannot parse malformed command.") + } } } thread(name = "Command line shell terminator", isDaemon = true) {