Description
The EntityListIterator at line 453 in EntityQuery.java should be closed and the code should be looks like below
private List<GenericValue> query(EntityFindOptions efo) throws GenericEntityException { EntityFindOptions findOptions = null; if (efo == null) { findOptions = makeEntityFindOptions(); } else { findOptions = efo; } List<GenericValue> result = null; if (dynamicViewEntity == null) { result = delegator.findList(entityName, makeWhereCondition(useCache), fieldsToSelect, orderBy, findOptions, useCache); } else { EntityListIterator it = queryIterator(); result = it.getCompleteList(); it.close(); } if (filterByDate && useCache) { return EntityUtil.filterByCondition(result, this.makeDateCondition()); } return result; }