Community
Participate
Working Groups
Created attachment 129429 [details] Project with the classes. Error is on Build ID: I20090313-0100 Steps To Reproduce: pkg1 ->Base class. Declares a protected abstract method pkg2 ->Derived extends Base. defines the method and uses that. While calling the method from Derived, I get an error saying its not accessible. Further, the quick fix suggests to make the method protected in Base (which is already protected)
This is expected behavior. A protected member can only be used for receiver type (or one of its subtype). This is why implicit access is allowed, but not via an AbstractBase. ======== AbstractBase other = null; getSomething(arg); // no error other.getSomething(arg); // error here. Also see the quick fix ConcreteDerived other2 = ...; other2.getSomething(null); // allowed as well.