Sonar is complaining that marking a collection field volatile is not enough to make it thread safe - which is true in general, but it seems like it does not accept ImmutableSet from Google collections as a valid thread safe implementation - is it somehow configurable?
As MomEngineer wrote, we use command line Sonar client 4.5.0.2216. There is nothing special in the snippet, it is just a plain Java class with public mutable fields marked with volatile. We use SonarCloud.io so I don’t know how to provide the exact SonarQube version which is hidden under the hood.