1.0.0-RC2 #19

Merged
ZhouXY108 merged 106 commits from 1.x.x into dev 2025-01-07 17:18:48 +08:00
Showing only changes of commit 8f588c25b5 - Show all commits

View File

@ -20,7 +20,7 @@ import java.util.Collections;
import java.util.List; import java.util.List;
import xyz.zhouxy.plusone.commons.annotation.StaticFactoryMethod; 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<T> {
private final List<T> content; private final List<T> content;
private PageResult(List<T> content, long total) { private PageResult(List<T> content, long total) {
AssertTools.checkNotNull(content, "Content must not be null."); this.content = CollectionTools.nullToEmptyList(content);
this.content = content;
this.total = total; this.total = total;
} }