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

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

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Trunk
    • 14.12.01, 16.11.01
    • None
    • 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

            jleroux Jacques Le Roux
            tzngvi Wei Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: