Community
Participate
Working Groups
abstract class Test { private static void bar(int arg) { } abstract void bar(); static class Foo extends Test { @Override void bar() { bar(1); } } } The above snippet compiles in eclipse, but throws the following error in javac (1.8.0_65-b17): error: no suitable method found for bar(int) bar(1); ^ method Test.bar() is not applicable (actual and formal argument lists differ in length) method Foo.bar() is not applicable (actual and formal argument lists differ in length) I'm not sure which behavior is correct.
Thanks for the test case. If you qualify the method call like this: Test.bar(1); also javac will agree that this method is accessible. It seems to be an issue of shadowing not detected by ecj, read: if Foo.bar() shadows Test.bar(int) then the latter cannot be referred to using the simple name "bar". I don't think that inheritance plays a role here (private methods are never inherited). If it were a case of inheritance, we'd be speaking of hiding of an inherited static method by an instance method, for which I don't readily see any rule in the spec.
bulk move out of 4.8
Bulk move out of 4.9
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant. -- The automated Eclipse Genie.