java:S107 misses some spring cases

Sonarqube 9.0
This rule complains about to much arguments used for methods, but it should exclude own bean definitions like this:

@Configuration
public class BarConfiguration {
@Bean
public Foo foo(A1 a1, A2 a2, A3 a3, A4 a4, …)
}

As this is used to request other dependencies that might be needed to construct Foo.

There seems to be a releated problem with constructors that are not annotated with @Autowired. This is not needed anymore in spring boot as long as the class has a @Component / @Service annotation

As of Spring 4.3, classes with a single constructor can omit the @Autowired annotation. This is a nice little bit of convenience and boilerplate removal.

Not tested but maybe java:S4288 is also affected by this, at least the compliant example suggests the autowired annotation

Hi @reitzmichnicht,
About S107, I create this ticket SONARJAVA-4072, and about S4288 I updated the S4288 example.
Thanks for your feedback,
Alban