[PATCH] 8071433: private static method in outer class shadowed by inherited public method

Dan Smith daniel.smith at oracle.com
Tue May 19 20:37:21 UTC 2015


> On May 14, 2015, at 4:36 AM, bsrbnd <bsrbnd at gmail.com> wrote:
> 
> Hi,
> 
> Thanks for your answer.
> You're right.
> Referring to JLS 15.12.1, method shadow(boolean) should be called from
> class FailImpl the following way:
> 
> public void a() {
>    StaticFail.shadow(false);
>    ((StaticFail)this).shadow(false);
>    super.shadow(false);
> }
> 
> Issue 8071433 should be closed?

Yep.  It's also a duplicate.  See (at least):
https://bugs.openjdk.java.net/browse/JDK-6998594

(I swear I've seen this 2 or 3 other times, but it took me awhile to finally find that one.)

—Dan


More information about the compiler-dev mailing list