Community
Participate
Working Groups
Build 3.0m1 Would be nice to signal cases where static members are referenced through a qualification which doesn't match the declaring class of the target member, e.g. public class X { public static int FOO = 0; } public class Y extends X { } Y.FOO --> <warning> indirect references to X.FOO
Warning added for static fields and methods. Added optional compiler diagnosis for indirect references to static members (matching problem IDs are: IProblem.IndirectAccessToStaticField, IProblem.IndirectAccessToStaticMethod). COMPILER / Reporting Indirect Reference to a Static Member When enabled, the compiler will issue an error or a warning whenever a static field or method is accessed in an indirect way. A reference to a static member should preferably be qualified with its declaring type name. - opt id "org.eclipse.jdt.core.compiler.problem.indirectStaticAccess" - possible values: { "error", "warning", "ignore" } - default: "ignore" Fixed
Verified.