From 8f588c25b5b8db8ad6abff9f0fc1292018867284 Mon Sep 17 00:00:00 2001 From: ZhouXY108 Date: Sun, 29 Dec 2024 22:40:35 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9E=84=E9=80=A0=20PageResult=20=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E5=A6=82=E6=9E=9C=20list=20=E6=98=AF=20null=EF=BC=8C?= =?UTF-8?q?=E5=88=99=E8=87=AA=E5=8A=A8=E8=BD=AC=E4=B8=BA=E7=A9=BA=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E4=B8=8D=E6=8A=9B=E5=BC=82=E5=B8=B8=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xyz/zhouxy/plusone/commons/model/dto/PageResult.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) 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; }