"Find Usages" doesn't find when a variable is initialized outside of constructor

For example

public class A {
     private int foo = 0;
     public A () {

     }
}

It doesn't find the usage of foo where it is being set to 0. Is this a bug or am I using Find Usages wrong?

3 comments
Comment actions Permalink

This is expected behavior..foo is only set, but never used in your code.

0
Comment actions Permalink

That was just me being lazy. In my actual code, foo is actually used.

0
Comment actions Permalink

The declaration of a variable or field is not considered a usage.

0

Please sign in to leave a comment.