You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by "Jacques Le Roux (JIRA)" <ji...@apache.org> on 2015/09/11 11:25:45 UTC

[jira] [Assigned] (OFBIZ-6615) The EntityListIterator does not be closed in EntityQuery.query()

     [ https://issues.apache.org/jira/browse/OFBIZ-6615?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jacques Le Roux reassigned OFBIZ-6615:
--------------------------------------

    Assignee: Jacques Le Roux

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