Rule:
java:S1144 - Unused “private” methods should be removed
Version:
SonarQube Community Edition Version 8.9 (build 43852)
Description:
The rule has a false positive when Java class has two private methods with the same name and one of them uses the other.
public class Test {
public String getValue() {
return getValue(12);
}
private String getValue(Integer number) {
return getValue("" + number);
}
private String getValue(String value) { // False positive is here
return value;
}
}
This code is valid in my SonarLint IDE plugin but has false positive on our SonarQube server.