Hello,
JChannel
instances from JGroups must be open for the whole applications lifetime (it should be closed on shutdown). Closing it in try-with-resources
in is bad because we’ll lose cluster communication due to the closed JChannel
.
I’ve prepared an example code to allow verification:
- class: https://github.com/agabrys/sonarqube-falsepositives/blob/master/src/main/java/biz/gabrys/agabrys/sonarqube/falsepositives/d20181102/JChannelAndS2095.java
- project: https://github.com/agabrys/sonarqube-falsepositives
- build:
mvn clean package sonar
Cheers