Hi Team,
Issue -
1. Usage of org.apache.sling.api.resource.ResourceResolver as a field is not thread safe.
2. Usage of javax.jcr.Session as a field is not thread safe.
3. ResourceResolver, Session should be closed in finally block.
Critical in SonarQube through CloudManager. What is the workaround for this scenario to handle in code. Below code quality documents not talks about the Thread safe scenario.
We are using serviceUser and we are taking serviceResourceResolver and there is no pointer how to resolve those scenario's.
If we close the resourceResolver and Session then it will not work as expected.
Reference -
https://experienceleague.adobe.com/docs/experience-manager-cloud-service/implementing/using-cloud-ma...
Thanks,
Kiran Parab