修复潜在的overflow异常

This commit is contained in:
neko 2020-10-03 17:12:09 +08:00 committed by GitHub
parent 2a24b7fd6e
commit ede632714d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);
}