No functional changes.
Replaces entityListIterator.close() in finally by try-with-ressource This is a weirdo badly written double case but with some refactoring I can confirm it works at https://localhost:8443/facility/control/ViewFacilityInventoryByProduct which uses the getProductInventoryAndFacilitySummary service git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1797161 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -428,14 +428,8 @@ public class EntityQuery {
|
||||
*/
|
||||
public long queryCount() throws GenericEntityException {
|
||||
if (dynamicViewEntity != null) {
|
||||
EntityListIterator iterator = null;
|
||||
try {
|
||||
iterator = queryIterator();
|
||||
try (EntityListIterator iterator = queryIterator()) {
|
||||
return iterator.getResultsSizeAfterPartialList();
|
||||
} finally {
|
||||
if (iterator != null) {
|
||||
iterator.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
return delegator.findCountByCondition(entityName, makeWhereCondition(false), havingEntityCondition, makeEntityFindOptions());
|
||||
|
||||
Reference in New Issue
Block a user