Skip to content

Commit

Permalink
added checking for empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
xuelianhan007 committed Dec 23, 2024
1 parent b4284e6 commit d67bdf4
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit d67bdf4

Please sign in to comment.