SonarQube version 7.6
When we use Spring Data ElasticSearch in Spring framework，The lifecycle of a Spring Bean is usually managed by the Spring IOC container。
But sonarQube raise a blocker bug saying “Use try-with-resources or close this “ElasticsearchRestClient” in a “finally” clause.”
Ideally this is not a bug, but due to this false analysis, our project rating is showing E.
Below is the code: