Sonarqube falsely marks a method as false positive if it is a method source for a JUnit Test which uses @MethodSource without a value (which means that the method has the same name as the test method).
if I understood the other thread correctly, only the case where a private method is referenced by name in annotations was getting fixed ([SONARJAVA-4943] - Jira) - that’s why I created this separate thread as was suggested by Irina Batinic in the last comment.
But if there is already a fix for the case where there is no method name inside the annotation in the making then never mind
Oh I’m sorry - in Sonarqube we don’t yet see the problem as it still uses sonar-java 7.33. We’re seeing the problem with the Sonarlint Plugin which already uses sonar-java 7.34.
I guess we would see the same effect in Sonarqube after the next upgrade.
Hi @kim.martin and @Bastian_Kanaan , we can confirm the issue. While the FP was fixed for @MethodSource and other annotations when a method is referenced by its name, the special case of using @MethodReference without parameters was not considered in the implementation.