SonarQube does not see the method link

I have a 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 a serious problem:

 Private method 'validate' is never used. 

Is this problem known?

How to fix it? workarounds?

+5
source share
1 answer

This is a known bug: see http://jira.sonarsource.com/browse/SONARJAVA-583

To provide more context here: this unused private method relies on the old implementation and (at the time of writing my answer) migrates to rely on semantic analysis, not just bytecode analysis.

+7
source

All Articles