diff --git a/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PageResult.java b/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PageResult.java index b73d0a0..353d86f 100644 --- a/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PageResult.java +++ b/src/main/java/xyz/zhouxy/plusone/commons/model/dto/PageResult.java @@ -20,7 +20,7 @@ import java.util.Collections; import java.util.List; import xyz.zhouxy.plusone.commons.annotation.StaticFactoryMethod; -import xyz.zhouxy.plusone.commons.util.AssertTools; +import xyz.zhouxy.plusone.commons.collection.CollectionTools; /** * 返回分页查询的结果 @@ -37,8 +37,7 @@ public class PageResult { private final List content; private PageResult(List content, long total) { - AssertTools.checkNotNull(content, "Content must not be null."); - this.content = content; + this.content = CollectionTools.nullToEmptyList(content); this.total = total; }