1

I am trying to clean my code and delete @Inject fields in my classes which are not used. I tried to follow this https://blog.jetbrains.com/idea/2009/04/global-unused-declaration-inspection/ in order to achieve this. Somebody seems to have succeeded in making it work in the comments of the link but it didn't work at all for me. As soon as I add @Inject over my fields, there is no warning, even if the injected variable is private and never used !

Is this not supported for some reason or is there somewhere else I need to change the settings ? What I did was to set private on the inspection of the fields. I even tried to add an entry point on the Inject annotation. Needless to say that nothing of this worked.

2
  • What IntelliJ IDEA version do you use? Similar issue was resolved recently. If it happens in 2017.2, please report a new bug with the sample project to reproduce.
    – CrazyCoder
    Jul 13, 2017 at 11:28
  • Okay well fyi it still doesn't work in 2017.2
    – Sly
    Jul 19, 2017 at 7:58

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.