[CORDA-2123]: Unhandled IndexOutOfBoundsException for malformed Shell commands. (fix) (#4225)

This commit is contained in:
Michele Sollecito 2018-11-13 10:44:04 +00:00 committed by GitHub
parent 71117ebdad
commit e2a351cb70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {