diff --git a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java index ea4e53ae5b..8ba5f082ce 100644 --- a/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java +++ b/framework/entity/src/main/java/org/apache/ofbiz/entity/util/EntityListIterator.java @@ -414,7 +414,7 @@ public class EntityListIterator implements AutoCloseable, ListIterator list = new ArrayList<>((int) this.getResultSize()); + List list = new ArrayList<>(); GenericValue nextValue; while ((nextValue = this.next()) != null) { @@ -457,7 +457,7 @@ public class EntityListIterator implements AutoCloseable, ListIterator(0); } - List list = new ArrayList<>(this.getResultsSizeAfterPartialList()); + List list = new ArrayList<>(); GenericValue nextValue = null; // number > 0 comparison goes first to avoid the unwanted call to next while (number > 0 && (nextValue = this.next()) != null) {