mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-04-19 03:01:48 +08:00
Merge pull request #1150 from akiyamaneko/list_util_enhanecd
修复ListUtil潜在的overflow异常
This commit is contained in:
commit
a82d5b2905
@ -252,8 +252,8 @@ public class ListUtil {
|
|||||||
return new ArrayList<>(0);
|
return new ArrayList<>(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// 相乘可能会导致越界 临时用long
|
||||||
if ((pageNo * pageSize) > resultSize) {
|
if (((long)pageNo * pageSize) > resultSize) {
|
||||||
// 越界直接返回空
|
// 越界直接返回空
|
||||||
return new ArrayList<>(0);
|
return new ArrayList<>(0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user