mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
fix PageResult bug
This commit is contained in:
parent
ba9bfee1b6
commit
2b824561ea
@ -17,6 +17,8 @@
|
|||||||
### 🐞Bug修复
|
### 🐞Bug修复
|
||||||
* 【core 】 修复RadixUtil.decode非static问题(issue#I3YPEH@Gitee)
|
* 【core 】 修复RadixUtil.decode非static问题(issue#I3YPEH@Gitee)
|
||||||
* 【core 】 修复EqualsBuilder数组判断问题(pr#1694@Github)
|
* 【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
|
* @param customFirstPageNo 自定义的首页页码,为0或者1
|
||||||
*/
|
*/
|
||||||
public static void setFirstPageNo(int customFirstPageNo) {
|
synchronized public static void setFirstPageNo(int customFirstPageNo) {
|
||||||
firstPageNo = 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;
|
public static final int DEFAULT_PAGE_SIZE = Page.DEFAULT_PAGE_SIZE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页码,0表示第一页
|
* 页码,{@link PageUtil#getFirstPageNo()}表示第一页
|
||||||
*/
|
*/
|
||||||
private int page;
|
private int page;
|
||||||
/**
|
/**
|
||||||
@ -142,7 +142,7 @@ public class PageResult<T> extends ArrayList<T> {
|
|||||||
* @return 是否第一页
|
* @return 是否第一页
|
||||||
*/
|
*/
|
||||||
public boolean isFirst() {
|
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 URL propertiesFileUrl;
|
||||||
private WatchMonitor watchMonitor;
|
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
|
// ----------------------------------------------------------------------- 私有属性 end
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user