Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse Juno - why no warning on unused annotated private field?

In the previous version of Eclipse this works fine.

In Errors/Warnings I checked "Unused private field" -> Warning. But it does not seem to work.

For example:

public class Main {
    @Resource
    private int a; //I see no warning here
}
like image 433
Vladimir Petrukhin Avatar asked Jul 12 '12 08:07

Vladimir Petrukhin


2 Answers

Eclipse Bug Report 386692 should soon be reopened, to also ignore the @Autowired annotation from the Spring framework.

like image 29
Andrei A Avatar answered Oct 21 '22 13:10

Andrei A


This is intentional see - https://bugs.eclipse.org/bugs/show_bug.cgi?id=365437. Also see an open bug on this topic - https://bugs.eclipse.org/bugs/show_bug.cgi?id=376590

like image 85
Deepak Azad Avatar answered Oct 21 '22 14:10

Deepak Azad