[ https://issues.apache.org/jira/browse/OFBIZ-6615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Wei Zhang updated OFBIZ-6615: ----------------------------- Description: The EntityListIterator at line 453 in EntityQuery.java should be closed and the code should be looks like below {code:|borderStyle=solid} 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; } {code} was: The EntityListIterator at line 453 should be closed and the code should be looks like below {code:|borderStyle=solid} 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; } {code} > The EntityListIterator does not be closed in EntityQuery.query() > ---------------------------------------------------------------- > > Key: OFBIZ-6615 > URL: https://issues.apache.org/jira/browse/OFBIZ-6615 > Project: OFBiz > Issue Type: Bug > Affects Versions: Trunk > Reporter: Wei Zhang > Assignee: Jacques Le Roux > > The EntityListIterator at line 453 in EntityQuery.java should be closed and the code should be looks like below > {code:|borderStyle=solid} > 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; > } > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332) |
Free forum by Nabble | Edit this page |