Community
Participate
Working Groups
[M5] Note, this is *not* the same test case as bug 31398 - note that here the method is widened to protected access by an intermediate class. PackageClass.java: package first; abstract class PackageClass { abstract void someMethod(); } BaseClass.java: package first; public abstract class BaseClass extends PackageClass { protected abstract void someMethod(); // Widened to protected access } Subclass.java: package second; import first.BaseClass; public class Subclass extends BaseClass { public void someMethod() { } } Error messages: Warning The method Subclass.someMethod() does not override the inherited method from PackageClass since it is private to a different package. Error This class must implement the inherited abstract method PackageClass.someMethod(), but cannot override it since it is not visible from Subclass. Either make the type abstract or make the inherited method visible. The above code is accepted by JDK1.4.1.
Duplicate of bug 31398 *** This bug has been marked as a duplicate of 31398 ***