Skip to content

Fix FileInputStream leak in ComponentDatabaseHandler (#3965)#3967

Open
PDGGK wants to merge 1 commit intoeclipse-sw360:mainfrom
PDGGK:fix/sw360-3965-fileinputstream-leak
Open

Fix FileInputStream leak in ComponentDatabaseHandler (#3965)#3967
PDGGK wants to merge 1 commit intoeclipse-sw360:mainfrom
PDGGK:fix/sw360-3965-fileinputstream-leak

Conversation

@PDGGK
Copy link

@PDGGK PDGGK commented Mar 21, 2026

Summary

Fixes unclosed FileInputStream in uploadAttachment() method.

Closes #3965

Changes

ComponentDatabaseHandler.java: Wrapped FileInputStream in try-with-resources in uploadAttachment(). The stream was previously created and passed to uploadAttachmentContent() without ever being closed.

@GMishx GMishx added needs code review needs general test This is general testing, meaning that there is no org specific issue to check for labels Mar 23, 2026
@PDGGK PDGGK force-pushed the fix/sw360-3965-fileinputstream-leak branch from 06acbcc to 05c537b Compare March 24, 2026 05:41
…ler (eclipse-sw360#3965)

Signed-off-by: ffccites <99155080+PDGGK@users.noreply.github.com>
@PDGGK PDGGK force-pushed the fix/sw360-3965-fileinputstream-leak branch from 05c537b to db084b1 Compare March 24, 2026 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs code review needs general test This is general testing, meaning that there is no org specific issue to check for

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource leak: FileInputStream never closed in ComponentDatabaseHandler.uploadAttachment

2 participants