Merge pull request #1150 from akiyamaneko/list_util_enhanecd

修复ListUtil潜在的overflow异常
This commit is contained in:
Golden Looly
2020-10-09 15:51:39 +08:00
committed by GitHub

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