S3242 and S4276 contradict each other

SonarQube Version 8.9 LTS with latest SonarJava Ruleset

When having both rules active the following code cannot satisfy both rules at the same time:


Hi Johannes,

I confirm that I can reproduce these exact same two issues.
In my opinion, it’s an S3242 false-positive, and we should add a specific exclusion about functional interfaces to this rule.
We probably didn’t see this problem before because S3242 is not part of the default quality profile.
I created the SONARJAVA-3900 to fix this problem.

Thanks for your feedback,


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.