Regarding your question, it’s not clear what’s wrong with the line of code you provided. If you still have problems after your upgrade, please come back to us and make sure to provide detail on what’s missing, and what language you’re working in.
Actually what is wrong is that we have an enabled rule: “Unnecessary imports should be removed”
And this import : import org.springframework.beans.factory.annotation.AnnotatedBeanDefinition;
is not used, so the rule should have picked it up and a bug / code smell …
Yes we are talking about java.
The rule “Unnecessary imports should be removed” the same project is working for java classes but not for java classes in spring services modules.
Here is an example where the same import is detected as duplicated but not detected as unused.
Thanks for your message. I think there are a few different issues here: Duplicated import is reported, but unused is not, unused import isn’t reported. So let’s not mix them and try to solve them one by one.
Firstly, I will need the minimal reproducer to be able to reproduce the issue. Could you, please, provide me with a small sample project, where it happens, so I can investigate it further?