Return-Path: X-Original-To: apmail-ofbiz-commits-archive@www.apache.org Delivered-To: apmail-ofbiz-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id EA31417687 for ; Fri, 11 Sep 2015 20:49:43 +0000 (UTC) Received: (qmail 65667 invoked by uid 500); 11 Sep 2015 20:49:43 -0000 Delivered-To: apmail-ofbiz-commits-archive@ofbiz.apache.org Received: (qmail 65632 invoked by uid 500); 11 Sep 2015 20:49:43 -0000 Mailing-List: contact commits-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ofbiz.apache.org Delivered-To: mailing list commits@ofbiz.apache.org Received: (qmail 65605 invoked by uid 99); 11 Sep 2015 20:49:43 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Sep 2015 20:49:43 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 7FC92AC0250 for ; Fri, 11 Sep 2015 20:49:43 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1702548 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java Date: Fri, 11 Sep 2015 20:49:43 -0000 To: commits@ofbiz.apache.org From: jleroux@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150911204943.7FC92AC0250@hades.apache.org> Author: jleroux Date: Fri Sep 11 20:49:42 2015 New Revision: 1702548 URL: http://svn.apache.org/r1702548 Log: A patch from Wei Zhang for "The EntityListIterator must be closed in EntityQuery.query()" https://issues.apache.org/jira/browse/OFBIZ-6615 jleroux: The EntityListIterator at line 453 is now closed (dynamicViewEntity complete list retrieved once, eg: agreementServices.getCommissionForProduct()) Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java Modified: ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java?rev=1702548&r1=1702547&r2=1702548&view=diff ============================================================================== --- ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java (original) +++ ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java Fri Sep 11 20:49:42 2015 @@ -450,14 +450,16 @@ public class EntityQuery { if (dynamicViewEntity == null) { result = delegator.findList(entityName, makeWhereCondition(useCache), fieldsToSelect, orderBy, findOptions, useCache); } else { - result = queryIterator().getCompleteList(); + EntityListIterator it = queryIterator(); + result = it.getCompleteList(); + it.close(); } if (filterByDate && useCache) { return EntityUtil.filterByCondition(result, this.makeDateCondition()); } return result; } - + private EntityFindOptions makeEntityFindOptions() { EntityFindOptions findOptions = new EntityFindOptions(); if (resultSetType != null) {