2 Commits

Author SHA1 Message Date
629a28ff62 格式化代码 2023-09-10 16:42:45 +08:00
791b3bb14c 允许继承 InvalidInputException 2023-09-10 16:42:36 +08:00
2 changed files with 4 additions and 4 deletions

View File

@@ -13,15 +13,15 @@ public class InvalidInputException extends BaseException {
public static final String ERROR_CODE = "4040200";
private InvalidInputException(String code, String msg) {
protected InvalidInputException(String code, String msg) {
super(code, msg);
}
private InvalidInputException(String code, Throwable cause) {
protected InvalidInputException(String code, Throwable cause) {
super(code, cause);
}
private InvalidInputException(String code, String msg, Throwable cause) {
protected InvalidInputException(String code, String msg, Throwable cause) {
super(code, msg, cause);
}

View File

@@ -47,7 +47,7 @@ public final class Validator<T> extends BaseValidator<T> {
withRule(rule, exceptionCreator);
return this;
}
public final <E extends RuntimeException> Validator<T> addRule(Predicate<T> rule, Function<T, E> exceptionCreator) {
withRule(rule, exceptionCreator);
return this;