[
https://issues.apache.org/jira/browse/CAMEL-23271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18075379#comment-18075379
]
Aurélien Pupier commented on CAMEL-23271:
-----------------------------------------
the HttpClient.newClient are still flagged, for instance
https://sonarcloud.io/project/issues?impactSeverities=BLOCKER&impactSoftwareQualities=RELIABILITY&issueStatuses=OPEN%2CCONFIRMED&id=apache_camel&open=AZy5QV3Lm1QRlwQ7cqiz
> Fix SonarCloud blocker reliability issues (resource leaks)
> ----------------------------------------------------------
>
> Key: CAMEL-23271
> URL: https://issues.apache.org/jira/browse/CAMEL-23271
> Project: Camel
> Issue Type: Improvement
> Reporter: Guillaume Nodet
> Priority: Major
>
> SonarCloud reports 31 blocker reliability issues (rule java:S2095 - resource
> leaks) against the project.
> *Real issues fixed:*
> * {{JcrConsumer}}: {{ScheduledExecutorService}} created but never stored or
> shut down — only the {{ScheduledFuture}} was kept
> * {{ModelWriterGeneratorMojo}}: {{DynamicClassLoader}} (extends
> {{URLClassLoader}}) never closed
> *False positives suppressed:*
> * 23 {{HttpClient.newHttpClient()}} instances flagged because SonarCloud
> analyzes against JDK 21+ (where {{HttpClient}} implements {{AutoCloseable}}),
> but the project compiles with {{--release 17}}. Fixed by setting
> {{sonar.java.source=17}}.
> * 6 {{ExecutorService}}/{{CamelContext}} instances where lifecycle is
> properly managed by Camel framework (ownership transfer via
> {{shutdownThreadPool}} flag, or stopped in finally block). Suppressed with
> {{@SuppressWarnings("java:S2095")}}.
> SonarCloud link:
> https://sonarcloud.io/project/issues?impactSeverities=BLOCKER&impactSoftwareQualities=RELIABILITY&issueStatuses=OPEN%2CCONFIRMED&id=apache_camel
--
This message was sent by Atlassian Jira
(v8.20.10#820010)