I have private method in my class.
public class MyClass {
public void method(){
....
List<String> filteredPaths = Arrays.asList(paths).stream().filter(this::validate).collect(Collectors.toList());
....
}
private boolean validate(String path){
...
}
}
I see major issue:
Private method 'validate' is never used.
Is this issue known?
How to fix it? workarounds?
It is a known bug: please see http://jira.sonarsource.com/browse/SONARJAVA-583
To provide more context here : This unused private method is relying on an old implementation and is (at time of writing my answer) being migrating to rely on semantic analysis and not only bytecode analysis.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With