diff --git a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/ValidationUtil.java b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/ValidationUtil.java index 196fb44..191b9ef 100644 --- a/blade-core-tool/src/main/java/org/springblade/core/tool/utils/ValidationUtil.java +++ b/blade-core-tool/src/main/java/org/springblade/core/tool/utils/ValidationUtil.java @@ -47,8 +47,8 @@ public class ValidationUtil { * @param setter 字段的setter方法 * @param valueSupplier 默认值提供方法 */ - public static void setValueIfBlank(Supplier getter, Consumer setter, Supplier valueSupplier) { - if (StringUtil.isBlank(getter.get())) { + public static void setValueIfBlank(Supplier getter, Consumer setter, Supplier valueSupplier) { + if (ObjectUtil.isEmpty(getter.get())) { setter.accept(valueSupplier.get()); } }