[ 
https://issues.apache.org/jira/browse/OFBIZ-13399?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18079424#comment-18079424
 ] 

Aditi Patel edited comment on OFBIZ-13399 at 5/8/26 11:13 AM:
--------------------------------------------------------------

Linking an additional PR for reference:

[https://github.com/apache/ofbiz-framework/pull/1174]

I am seeing the following error on my end:
java.lang.IllegalArgumentException: Error running script at location 
[component://order/src/main/groovy/org/apache/ofbiz/order/entry/StorePaymentOptions.groovy]:
 java.util.NoSuchElementException


was (Author: JIRAUSER313310):
Linking additional PR for this improvement:

https://github.com/apache/ofbiz-framework/pull/1174

This PR also addresses the use of try-with-resources for {{EntityListIterator}} 
to ensure proper resource handling and prevent potential leaks.

> Use try-with-resources for EntityListIterator
> ---------------------------------------------
>
>                 Key: OFBIZ-13399
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-13399
>             Project: OFBiz
>          Issue Type: New Feature
>            Reporter: Deepak Dixit
>            Assignee: Deepak Dixit
>            Priority: Major
>
> Replace manual handling of {{EntityListIterator}} with try-with-resources (or 
> Groovy {{{}withCloseable{}}}) to ensure proper resource management and avoid 
> potential resource leaks.
> Currently, iterators are being closed manually using {{close()}} or sometimes 
> not closed.
> This can lead to:
>  * Open JDBC {{{}ResultSet{}}}/cursor leaks
>  * Increased memory usage
>  * Connection/resource exhaustion under load



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to