Hi,
it seems that the Java plugin version 4.0 no longer excludes getters and setters when measuring the Public API metric.
I'm using SonarQube 5.6 with the Java plugin version 4.0. The following example class is marked with 2 undocumented public APIs:
/**
* Bean with getter and setter.
*/
public class TestBean {
private String someField;
public String getSomeField() {
return someField;
}
public void setSomeField(String someField) {
this.someField = someField;
}
}
This was not the case in older SonarQube and Java plugin versions (e.g. SonarQube 4.5.7 and Java plugin 3.13.1) where setters and getters were ignored.
I guess that the new behavior was introduced with
https://jira.sonarsource.com/browse/SONARJAVA-398. As I understand this, it is no longer possilble to configure the exclusion of setters and getters as the corresponding configuration property and the setting in the user interface were removed.
Is it possible to restore the former behavior concerning the Public API metric? In my opinion, commenting getters and setters is (in most cases) superfluous and a waste of time. Furthermore it unnecessarily bloats the code.
Thanks in advance & best regards
Stephan