Skip to content

Commit

Permalink
fix(sdk): added checking for empty string (#314)
Browse files Browse the repository at this point in the history
* added checking rules for empty string
  • Loading branch information
xuelianhan007 authored Dec 23, 2024
1 parent b4284e6 commit 5c40cc1
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ default boolean checkExpectString(PathCheck pathCheck, Object variable) {
variable,
(dataType == null ? null : dataType.getSimpleName()),
"String"));
} else if (StringUtils.isBlank((String) variable)) {
throwException(
pathCheck,
String.format(
EXPECT_INT_MSG,
extractCheckingPath(pathCheck.path()),
variable,
"empty string",
"Non Empty String"));
}
return true;
}
Expand Down

0 comments on commit 5c40cc1

Please sign in to comment.