mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-05-09 23:51:34 +08:00
修复潜在的overflow异常
This commit is contained in:
parent
2a24b7fd6e
commit
ede632714d
@ -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