Template for a good bug report, formatted with Markdown:
- SonarQube Version used: 8.9 LTS Community Edition. Scanner Version used: 4.6.2.2472
I have an example where I observe a strange behaviour on code duplications:
Assume, this is the content of a Java file:
File A has a method:
public Object someMethodMayReturnNull() {
return something != null ? something.getSomething() : null;
}
File B called this method
Object obj = FileA.getInstance().someMethodMayReturnNull();
String result = obj.getXXX();
obj could be null, but sonarqube fails to detect in this scenrio