You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ofbiz.apache.org by "Chandan Khandelwal (Jira)" <ji...@apache.org> on 2026/05/22 12:40:00 UTC
[jira] [Created] (OFBIZ-13421) Prevent potential resource leak in CoreEvents.java streamFile method
Chandan Khandelwal created OFBIZ-13421:
------------------------------------------
Summary: Prevent potential resource leak in CoreEvents.java streamFile method
Key: OFBIZ-13421
URL: https://issues.apache.org/jira/browse/OFBIZ-13421
Project: OFBiz
Issue Type: Improvement
Components: framework
Reporter: Chandan Khandelwal
Assignee: Chandan Khandelwal
Fix For: Upcoming Branch
{{In CoreEvents.java, the FileInputStream in the streamFile method is closed manually. If the streaming process throws an IOException (e.g., when a user aborts the download), the close call is bypassed, causing a file descriptor resource leak. This task refactors the method to use try-with-resources to prevent the leak and ensure the stream is closed under all conditions.}}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)