Sonar is throwing wrong code smell even if imoort is being used

sonar qube - 7.7

For java, even if import is used, still getting error to remove ununsed unimport

Unnecessary imports should be removed

Hello, welcome to the SonarSource community!

I created a similar code, with an import used in a type annotation, and I did not manage to reproduce this issue with the current version of the Java analyzer.

Version 7.7 is already quite old, we greatly improved the differents analyzers since then, I expect one of the many changes was a fix for this false positive. Updating to a recent version should remove it.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.