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);