Hello,
Adam L hit a false positive in the S2168 rule when an instance is assigned in an other method. He added a post on Stack Overflow
https://stackoverflow.com/q/49741933/4944847 (I apologize for cross-posting) and today I finally confirmed that the problem is caused by the rule.
Environment:
Project:
https://github.com/agabrys/sonarqube-falsepositives
Build:
mvn clean package sonar
Regards
Adam Gabryś