Community
Participate
Working Groups
public class Bug_NeverReadLocally { private String s; // ^ eclipse says : "field s is never used locally" public Bug_NeverReadLocally(String s) { this.s = s; } public static void main(String[] args) { new Bug_NeverReadLocally("some string"); } }
The diagnostic is for read accesses; i.e. in Eclipse 3.1, the message reads: "The field X.s is never read locally". Considering write accesses would lower the relevance of this diagnostic; i.e. what's the value of the field if never read from ?
Hey, you are totally right :)
Thanks for confirming it !