Community
Participate
Working Groups
A class defined like this: public class Good { private static final String B = "This is a" + A; private static final String A = " test"; } (which doesn't compile) Will be correct sorted to: public class Good { private static final String A = " test"; private static final String B = "This is a" + A; } Because the variables are sorted in alphabetic order, however, the class: public class Bad { private static final String B = " test"; private static final String A = "This is a" + B; } (which does compile) Will be incorrectly sorted to: public class Bad { private static final String A = "This is a" + B; private static final String B = " test"; } (which *does not* compile) Sort members should not simply sort the variable name but should also take into account the dependency between variables.
Sort members only considers the source, no resolution is done (you need to resolve "B" to know that it binds to field B). No plan to change this.
Verified for 3.4M3 using I20071029-0010 build.