mirror of
https://gitee.com/dromara/hutool.git
synced 2025-04-05 17:37:59 +08:00
修复潜在的overflow异常
This commit is contained in:
parent
2a24b7fd6e
commit
ede632714d
@ -252,8 +252,8 @@ public class ListUtil {
|
||||
return new ArrayList<>(0);
|
||||
}
|
||||
}
|
||||
|
||||
if ((pageNo * pageSize) > resultSize) {
|
||||
// 相乘可能会导致越界 临时用long
|
||||
if (((long)pageNo * pageSize) > resultSize) {
|
||||
// 越界直接返回空
|
||||
return new ArrayList<>(0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user