“Variable is never assigned” warning in IntelliJ IDEA can be suppressed only "partially"

There are two separate warnings. One says the field was never assigned a value, which is the one you have disabled. The other says the field was never used, which is the warning you are getting.

Add Inject to settings -> editor -> inspections -> java -> declaration redundancy -> unused declarations -> entry points -> annotations -> Mark as entry point if annotated by


Highlight the field, type Alt + Enter "Windows" or ⌥⏎ "Mac" or Just click on the Light Bulb. Select the "Suppress for fields annotated by {annotation name}.


It seems that it was a bug in IDEA. I've just updated to IDEA 2016.3.1 and now @Inject and @Resource annotations put in the "entry points" section do not work - they have to be put in the "fields" window (although when they are in "entry points" section I can still observe the "old" behavior i.e. annotated fields are not detected by code inspection yet they are underlined in the editor and yellow marker is visible).