svn commit: r1702548 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1702548 - /ofbiz/trunk/framework/entity/src/org/ofbiz/entity/util/EntityQuery.java

jleroux@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) {