From db909ff93f7675485e615c35ebb258be92d62ba5 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Tue, 4 Apr 2023 00:07:32 +0800 Subject: [PATCH] fix bug. --- .../java/xyz/zhouxy/plusone/validator/CollectionValidator.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/xyz/zhouxy/plusone/validator/CollectionValidator.java b/src/main/java/xyz/zhouxy/plusone/validator/CollectionValidator.java index 5a79048..d4ab7ba 100644 --- a/src/main/java/xyz/zhouxy/plusone/validator/CollectionValidator.java +++ b/src/main/java/xyz/zhouxy/plusone/validator/CollectionValidator.java @@ -45,7 +45,7 @@ public class CollectionValidator extends PropertyValidator, E> exceptionCreator) { withRule(value -> { if (value == null) { - return false; + return true; } return ((Collection) value).isEmpty(); }, exceptionCreator);