Skip to content

Improved: Prevent potential resource leak in FtpServices.java putFile/getFile (OFBIZ-13427)#1300

Open
chandan-khandelwal wants to merge 1 commit into
apache:trunkfrom
chandan-khandelwal:OFBIZ-13427
Open

Improved: Prevent potential resource leak in FtpServices.java putFile/getFile (OFBIZ-13427)#1300
chandan-khandelwal wants to merge 1 commit into
apache:trunkfrom
chandan-khandelwal:OFBIZ-13427

Conversation

@chandan-khandelwal
Copy link
Copy Markdown
Contributor

Improved: Prevent potential resource leak in FtpServices.java putFile/getFile (OFBIZ-13427)

We refactored putFile and getFile in FtpServices.java to use try-with-resources, ensuring local file streams are always closed automatically to prevent file descriptor leaks.

@chandan-khandelwal chandan-khandelwal changed the title Improved: Prevent potential resource leak in FtpServices.java putFile… Improved: Prevent potential resource leak in FtpServices.java putFile/getFile (OFBIZ-13427) May 29, 2026
@nmalin
Copy link
Copy Markdown
Contributor

nmalin commented Jun 1, 2026

Hello @chandan-khandelwal, you pull request is ready to merge ?

I looked that you change the try/catch block declaration, is enough escape the resource leak ?

@chandan-khandelwal
Copy link
Copy Markdown
Contributor Author

Yes @nmalin the pull request is ready to merge.

The code now properly closes the resource, so this should address the reported resource leak issue.

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.

2 participants