mirror of
https://gitee.com/dromara/hutool.git
synced 2025-05-03 04:13:49 +08:00
fix PageResult bug
This commit is contained in:
parent
ba9bfee1b6
commit
2b824561ea
@ -17,6 +17,8 @@
|
||||
### 🐞Bug修复
|
||||
* 【core 】 修复RadixUtil.decode非static问题(issue#I3YPEH@Gitee)
|
||||
* 【core 】 修复EqualsBuilder数组判断问题(pr#1694@Github)
|
||||
* 【setting】 修复Props中Charset对象无法序列化的问题(pr#1694@Github)
|
||||
* 【db 】 修复PageResult首页判断逻辑问题(issue#1699@Github)
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
@ -31,7 +31,7 @@ public class PageUtil {
|
||||
*
|
||||
* @param customFirstPageNo 自定义的首页页码,为0或者1
|
||||
*/
|
||||
public static void setFirstPageNo(int customFirstPageNo) {
|
||||
synchronized public static void setFirstPageNo(int customFirstPageNo) {
|
||||
firstPageNo = customFirstPageNo;
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@ public class PageResult<T> extends ArrayList<T> {
|
||||
public static final int DEFAULT_PAGE_SIZE = Page.DEFAULT_PAGE_SIZE;
|
||||
|
||||
/**
|
||||
* 页码,0表示第一页
|
||||
* 页码,{@link PageUtil#getFirstPageNo()}表示第一页
|
||||
*/
|
||||
private int page;
|
||||
/**
|
||||
@ -142,7 +142,7 @@ public class PageResult<T> extends ArrayList<T> {
|
||||
* @return 是否第一页
|
||||
*/
|
||||
public boolean isFirst() {
|
||||
return this.page == 0;
|
||||
return this.page == PageUtil.getFirstPageNo();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -67,9 +67,10 @@ public final class Props extends Properties implements BasicTypeGetter<String>,
|
||||
private URL propertiesFileUrl;
|
||||
private WatchMonitor watchMonitor;
|
||||
/**
|
||||
* properties文件编码
|
||||
* properties文件编码<br>
|
||||
* issue#1701,此属性不能被序列化,故忽略序列化
|
||||
*/
|
||||
private Charset charset = CharsetUtil.CHARSET_ISO_8859_1;
|
||||
private transient Charset charset = CharsetUtil.CHARSET_ISO_8859_1;
|
||||
// ----------------------------------------------------------------------- 私有属性 end
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user