Community
Participate
Working Groups
Private methods cannot be overriden as specified in section 8.4.8.1 of The Java Language Specification, Third Edition (JLS3): 8.4.8.1 Overriding (by Instance Methods) An instance method m1 declared in a class C overrides another instance method, m2, declared in class A iff all of the following are true: 1. C is a subclass of A. 2. The signature of m1 is a subsignature (ยง8.4.2) of the signature of m2. 3. Either * m2 is public, protected or declared with default access in the same package as C, or * m1 overrides a method m3, m3 distinct from m1, m3 distinct from m2, such that m3 overrides m2. Moreover, if m1 is not abstract, then m1 is said to implement any and all declarations of abstract methods that it overrides.
Kent - We may exhibit same behavior in compiler when checking for presence of @Overrides. We may try to tag less methods with AccOverriding. What about default ones from different package, etc... I think we special cases static ones in the @Overrides diagnostic, but it starts feeling like we tag too many methods with AccOverriding.
Created attachment 37859 [details] Proposed patch and regression test
+1 for 3.2RC1, DOM change only.
Released patch and regression tests.
Verified for 3.2 RC1 using build I20060413-0010.