1.fix out of array bounds issue

main
Gary 8 months ago
parent f455beea42
commit 0cfe49eb3e

@ -55,7 +55,7 @@ public class CleanJournalCache {
for (int pageNum = 1; (pageNum - 1) * pageSize < list.size(); pageNum++) {
int startIndex = (pageNum - 1) * pageSize;
int endIndex = pageNum * pageSize - 1;
if (endIndex > list.size()) {
if (endIndex >= list.size()) {
return pageNum;
}
if (list.get(startIndex) >= value && list.get(endIndex) <= value) {

Loading…
Cancel
Save