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

ASF subversion and git services commented on OFBIZ-9385:
--------------------------------------------------------

Commit 0e931d5ae4445c8e3a800d552ddacec2940941ba in ofbiz-framework's branch 
refs/heads/trunk from Jacques Le Roux
[ https://gitbox.apache.org/repos/asf?p=ofbiz-framework.git;h=0e931d5ae4 ]

Reverts "Fixed: EntityListIterator closed but not in case of exception 
(OFBIZ-9385)"

This reverts commit 688142c5d3fc72c36ffd585fa2b08a9ac3d62df4.

Not closing eli in handleOutput is not an option, nor using a try-with-ressource
for eli for the same reason

I put a comment in ListFinder to make things a bit more clear.


> EntityListIterator closed but not in case of exception
> ------------------------------------------------------
>
>                 Key: OFBIZ-9385
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-9385
>             Project: OFBiz
>          Issue Type: Sub-task
>          Components: ALL COMPONENTS
>    Affects Versions: Trunk
>            Reporter: Jacques Le Roux
>            Assignee: Jacques Le Roux
>            Priority: Minor
>             Fix For: 17.12.01, 22.01.01
>
>
> I found several cases. This is an improvement only because no cases were 
> reported. But obviously in case of unlucky exception after the 
> EntityListIterator creation and before it's closed the EntityListIterator 
> remains in memory. It should be closed in EntityListIterator.finalize() but 
> the less happens there the better.
> The solution is to use try-with-ressources when (easily) possible (some cases 
> are quite convoluted)



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

Reply via email to