"Unused declaration" inspection ignores @Autowired fields
Answered
When I run the default "Unused declaration" inspection with default settings on a class with unused fields which are annotated with `@Autowired` then the inspection doesn't recognize them as unused. When I remove the annotation they're found.
Interestingly the field is still greyed out:

So for some reason the inspection seems to work when run automatically but not when I run it. What could be the cause of this? Thanks!
Please sign in to leave a comment.
Hi Simon,
I created a bug report for this on our issue tracker: IDEA-264844. Responsible developers will look into it shortly.
Feel free to follow the issue to stay updated on the progress of the investigation, and leave additional comments.
See this article if you are not familiar with YouTrack.