From d67bdf4ad1c14659249a43d4dd116d36283a564d Mon Sep 17 00:00:00 2001 From: xuelianhan007 Date: Mon, 23 Dec 2024 10:23:35 +0800 Subject: [PATCH] added checking for empty string --- .../kraken/operator/gateway/runner/DataTypeChecker.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/kraken-java-sdk/kraken-java-sdk-gateway/src/main/java/com/consoleconnect/kraken/operator/gateway/runner/DataTypeChecker.java b/kraken-java-sdk/kraken-java-sdk-gateway/src/main/java/com/consoleconnect/kraken/operator/gateway/runner/DataTypeChecker.java index bd6bbeed..858179fa 100644 --- a/kraken-java-sdk/kraken-java-sdk-gateway/src/main/java/com/consoleconnect/kraken/operator/gateway/runner/DataTypeChecker.java +++ b/kraken-java-sdk/kraken-java-sdk-gateway/src/main/java/com/consoleconnect/kraken/operator/gateway/runner/DataTypeChecker.java @@ -61,7 +61,9 @@ default boolean checkExpectNotBlank(PathCheck pathCheck, Object variable) { default boolean checkExpectString(PathCheck pathCheck, Object variable) { Class dataType = whichDataTypeClass(variable); - if (Objects.isNull(variable) || !String.class.equals(dataType)) { + if (Objects.isNull(variable) + || !String.class.equals(dataType) + || StringUtils.isBlank((String) variable)) { throwException( pathCheck, String.format(