Skip to content

Refactor Groovy EntityListIterator usage with auto-closeable handling…#1167

Merged
dixitdeepak merged 1 commit intoapache:trunkfrom
dixitdeepak:OFBIZ-13399-try-with-resource
May 7, 2026
Merged

Refactor Groovy EntityListIterator usage with auto-closeable handling…#1167
dixitdeepak merged 1 commit intoapache:trunkfrom
dixitdeepak:OFBIZ-13399-try-with-resource

Conversation

@dixitdeepak
Copy link
Copy Markdown
Contributor

Improved : Updated Groovy files to use safer resource management patterns for EntityListIterator (OFBIZ-13399)

  • Replaced manual iterator close handling with try-with-resources style implementations where applicable
  • Used Groovy withCloseable for automatic resource cleanup
  • Replaced EntityListIterator usage with EntityQuery.queryPagedList() where only partial/paged results were required
  • Removed unnecessary manual close() calls
  • Reduced risk of JDBC cursor and ResultSet resource leaks
  • Improved readability and aligned code with modern OFBiz best practices

Changes were applied to Groovy files; full regression testing has not yet been completed for all updated flows.

… (OFBIZ-13399)

Updated Groovy files to use safer resource management patterns for EntityListIterator.

- Replaced manual iterator close handling with try-with-resources style implementations where applicable
- Used Groovy withCloseable for automatic resource cleanup
- Replaced EntityListIterator usage with EntityQuery.queryPagedList() where only partial/paged results were required
- Removed unnecessary manual close() calls
- Reduced risk of JDBC cursor and ResultSet resource leaks
- Improved readability and aligned code with modern OFBiz best practices

Changes were applied to Groovy files; full regression testing has not yet been completed for all updated flows.
@dixitdeepak dixitdeepak merged commit d801361 into apache:trunk May 7, 2026
4 of 5 checks passed
@dixitdeepak dixitdeepak deleted the OFBIZ-13399-try-with-resource branch May 7, 2026 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant