Skip to content

Close leaked resources flagged by SonarQube (S2095) - #526

Open
NicoPiel wants to merge 1 commit into
OpenIntegrationEngine:mainfrom
NicoPiel:fix/sonar-resource-leaks
Open

NicoPiel wants to merge 1 commit into
OpenIntegrationEngine:mainfrom
NicoPiel:fix/sonar-resource-leaks

Conversation

@NicoPiel

@NicoPiel NicoPiel commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

MirthWebServer never closed the downloaded file's stream on success, so each download leaked a file handle. Also close the Statement in DefaultDatabaseTaskController.executeUpdate, and close the socket, connection or file when setup fails after creation in SocketUtil, DisabledConnectionPool and UnzipEngine. The extension manager and PDF viewer now use try-with-resources.

MirthWebServer never closed the downloaded file's stream on success, so each download leaked a file handle. Also close the Statement in DefaultDatabaseTaskController.executeUpdate, and close the socket, connection or file when setup fails after creation in SocketUtil, DisabledConnectionPool and UnzipEngine. The extension manager and PDF viewer now use try-with-resources.

Signed-off-by: Nico Piel <nico.piel@hotmail.de>
@github-actions

Copy link
Copy Markdown

Test Results

130 files  ±0  130 suites  ±0   3m 51s ⏱️ +49s
789 tests ±0  789 ✅ ±0  0 💤 ±0  0 ❌ ±0 
915 runs  ±0  909 ✅ ±0  6 💤 ±0  0 ❌ ±0 

Results for commit c50ea99. ± Comparison against base commit a403039.

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