gnodet opened a new pull request, #24358:
URL: https://github.com/apache/camel/pull/24358

   ## Summary
   
   _Claude Code on behalf of Guillaume Nodet_
   
   Suppress SonarCloud S2095 (Resources should be closed) false positives 
across 8 files in 6 modules where the resource lifecycle is intentionally 
managed by an external owner or the resource is not AutoCloseable in the target 
Java version:
   
   - **camel-salesforce**: `ExecutorService` created in 
`SalesforceComponent.createHttpClient()` is managed by `SalesforceHttpClient` 
(replaces inline `// NOSONAR` with method-level `@SuppressWarnings`)
   - **camel-core-reifier**: `ExecutorService` in `AggregateReifier` and 
`ThreadsReifier` is managed by their respective processors via the 
`shutdownThreadPool` flag (moves `@SuppressWarnings` from local variable to 
method level)
   - **camel-jbang-core**: `URLClassLoader` in 
`CatalogLoader.loadQuarkusCatalog()` and `PluginHelper.loadFromCache()` is 
intentionally kept open as the plugin/version-manager classloader
   - **camel-jbang-plugin-tui**: `DelegateOutputStream` in 
`ShellPanel.startShell()` is owned by the virtual terminal and closed in 
`stopShell()`
   - **camel-test-infra-qdrant**: `HttpClient.newHttpClient()` in 
`QdrantInfraService.put()` -- `java.net.http.HttpClient` does not implement 
`AutoCloseable` before Java 21
   - **camel-package-maven-plugin**: `HttpClient.newHttpClient()` in 
`UpdateCamelReleasesMojo` -- same Java 21 limitation
   
   All suppressions include a comment explaining why the resource does not need 
closing at the flagged location.
   
   ## Test plan
   
   - [x] `mvn formatter:format impsort:sort` passes on all affected modules
   - [x] `mvn clean install -Dquickly` passes on all affected modules
   - [ ] CI build passes
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to