From d071960a86b2532bdedc754199a58d96d7300a74 Mon Sep 17 00:00:00 2001 From: Dzianis Lisiankou Date: Wed, 6 Mar 2024 12:03:54 +0300 Subject: [PATCH] IJMP-1409: add check if an empty command is entered --- .../formainframe/ui/build/tso/utils/InputRecognizer.kt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/kotlin/eu/ibagroup/formainframe/ui/build/tso/utils/InputRecognizer.kt b/src/main/kotlin/eu/ibagroup/formainframe/ui/build/tso/utils/InputRecognizer.kt index 08798dfd..b4743e79 100644 --- a/src/main/kotlin/eu/ibagroup/formainframe/ui/build/tso/utils/InputRecognizer.kt +++ b/src/main/kotlin/eu/ibagroup/formainframe/ui/build/tso/utils/InputRecognizer.kt @@ -39,6 +39,10 @@ class InputRecognizer( */ fun recognizeMessage(command: String) : Message<*> { val upperCommand = command.toUpperCasePreservingASCIIRules().trim() + if (upperCommand.isEmpty()) { + previousCommand = upperCommand + return OrdinaryMessage(command, session) + } val parseExecStm = upperCommand.substringBefore(" ") if (parseExecStm == "EX" || parseExecStm == "EXEC" || previousCommand == "EX" || previousCommand == "EXEC") { val parseAfterExec = upperCommand.substringAfter(" ").trim()