From d2d760e8664ad4597ea7d88a94de6e921a26ff10 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Tue, 16 Apr 2024 21:03:24 +0800 Subject: [PATCH] =?UTF-8?q?ValidatableStringRecord=20=E7=9A=84=E5=80=BC?= =?UTF-8?q?=E6=BB=A1=E8=B6=B3=20Pattern=20=E5=8D=B3=E5=8F=AF=EF=BC=8C?= =?UTF-8?q?=E4=B8=8D=E8=A6=81=E6=B1=82=20not=20blank=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plusone/commons/domain/ValidatableStringRecord.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecord.java b/src/main/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecord.java index 8cf859d..d84badb 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecord.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/domain/ValidatableStringRecord.java @@ -19,8 +19,6 @@ package xyz.zhouxy.plusone.commons.domain; import java.util.Objects; import java.util.regex.Pattern; -import org.apache.commons.lang3.StringUtils; - import com.google.common.base.Preconditions; import xyz.zhouxy.plusone.commons.util.RegexTools; @@ -37,7 +35,7 @@ public abstract class ValidatableStringRecord protected ValidatableStringRecord(String value, Pattern pattern) { Preconditions.checkNotNull(pattern, "The pattern must not be null."); - Preconditions.checkNotNull(StringUtils.isNotBlank(value), "The value must not be null."); + Preconditions.checkNotNull(value, "The value must not be null."); Preconditions.checkArgument(RegexTools.matches(value, pattern)); this.value = value; }