diff --git a/plusone-basic/plusone-basic-common/src/main/java/xyz/zhouxy/plusone/util/PlusoneStrUtil.java b/plusone-basic/plusone-basic-common/src/main/java/xyz/zhouxy/plusone/util/PlusoneStrUtil.java index f6ce284..238dc49 100644 --- a/plusone-basic/plusone-basic-common/src/main/java/xyz/zhouxy/plusone/util/PlusoneStrUtil.java +++ b/plusone-basic/plusone-basic-common/src/main/java/xyz/zhouxy/plusone/util/PlusoneStrUtil.java @@ -1,9 +1,5 @@ package xyz.zhouxy.plusone.util; -import java.util.Objects; -import java.util.regex.Pattern; - -import org.springframework.util.Assert; import org.springframework.util.StringUtils; /** @@ -27,17 +23,4 @@ public class PlusoneStrUtil { return StringUtils.hasLength(value) ? value : EMPTY_STR; } - public static String checkString(String value, String regex, String message) { - Assert.notNull(value, message); - Assert.isTrue(Pattern.matches(regex, value), message); - return value; - } - - public static String checkStringNullable(String value, String regex, String message) { - return Objects.nonNull(value) ? checkString(value, regex, message) : null; - } - - public static String checkStringOrDefault(String value, String regex, String message) { - return StringUtils.hasText(value) ? checkString(value, regex, message) : ""; - } }