AssertTools 删除 checkArgumentNotNull 方法,新增 checkExists、checkAffectedRows、checkAffectedOneRow 方法。

This commit is contained in:
2024-12-02 18:28:23 +08:00
parent d499433a34
commit c06c486ab9
6 changed files with 209 additions and 54 deletions

View File

@@ -50,8 +50,8 @@ public abstract class ValidatableStringRecord
protected ValidatableStringRecord(@Nonnull String value, @Nonnull Pattern pattern,
@Nonnull String errorMessage) {
AssertTools.checkArgumentNotNull(value, "The value cannot be null.");
AssertTools.checkArgumentNotNull(pattern, "The pattern cannot be null.");
AssertTools.checkArgument(Objects.nonNull(value), "The value cannot be null.");
AssertTools.checkArgument(Objects.nonNull(pattern), "The pattern cannot be null.");
this.matcher = pattern.matcher(value);
AssertTools.checkArgument(this.matcher.matches(), errorMessage);
this.value = value;