squid:UnusedPrivateMethod False Positive

The rule
squid:UnusedPrivateMethod is incorrectly flagged on actually used private method, which has the same name as another method in the same class .

  • versions used (6.7.6 version of sonarqube, Sonar java version 5.11 (build 17289))
import java.util.ArrayList;
import java.util.List;

public class A {

	private List<B> values = new ArrayList<>();

	public List<B> getValues() {
		return values;
	}

	public void setValues(List<B> values) {
		this.values = values;
	}
}

import java.util.ArrayList;
import java.util.List;

public class B {

	private List<C> values = new ArrayList<>();

	public List<C> getValues() {
		return values;
	}

	public void setValues(List<C> values) {
		this.values = values;
	}
}


public class C {

}

import java.util.List;

public class WrongClass {

	void testMethod(A object) {
		object.getValues().stream().forEach(value -> testMethod(value.getValues()));
	}

	private void testMethod(List<C> list) { // would be reported as unused private method, even though it is used
		//implementation
	}

}