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

偶尔善良 提交于 2019-12-19 14:51:33

问题


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
}

回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/11447910/eclipse-juno-why-no-warning-on-unused-annotated-private-field

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!