Skip to content

Commit

Permalink
Fixed: Use try with resource for closing ‘EntityListIterator’
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/ofbiz/ofbiz-framework/trunk@1857084 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
mthl committed Apr 7, 2019
1 parent 3111fc6 commit be39e09
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1215,8 +1215,7 @@ private boolean checkFormData(Map<String, Object> context) {
}
int itemIndex = -1;
if (iter instanceof EntityListIterator) {
EntityListIterator eli = (EntityListIterator) iter;
try {
try (EntityListIterator eli = (EntityListIterator) iter) {
if(eli.getResultsSizeAfterPartialList() > 0){
itemIndex++;
}
Expand Down

0 comments on commit be39e09

Please sign in to comment.