Uploaded image for project: 'OFBiz'
  1. OFBiz
  2. OFBIZ-6615

The EntityListIterator does not be closed in EntityQuery.query()

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: Trunk
    • Fix Version/s: 14.12.01, 16.11.01
    • Component/s: None
    • Labels:
      None

      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;
          }
      

        Attachments

          Activity

            People

            • Assignee:
              jacques.le.roux Jacques Le Roux
              Reporter:
              tzngvi Wei Zhang
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: