Community
Participate
Working Groups
The following legal code results in compile error, which shouldn't be the case: package beans; public abstract class Base { abstract void doSomething(); } package beans; public abstract class SubClass extends Base { public final void doSomething() { System.out.println("hello world"); } public void anotherMethod() { } } package beans.test; import beans.SubClass; public class TestClass extends SubClass { public void anotherMethod() { super.anotherMethod(); } } In this case, the base class in package "beans" defines a package-private method doSomething() which the subclass, "SubClass" implements as a public final method. Any class that extends from "SubClass" but is in a different package, then contains the following compile error: "This class must implement the inherited abstract method Base.doSomething(), but cannot override it since it is not visible from TestClass. Either make the type abstract or make the inherited method visible." Making the Base.doSomething() public will fix this error; however this isn't a Java error--this compiles fine using javac and older Eclipse versions. Environment: JDK 1.4.1_01 Eclipse M5
This looks like a duplicate of bug 31398. You can get the patch from the JDT/Core dev page. See http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/jdt-core-home/r2.1/main.html#updates This link might be split by bugzilla. Let us know if this fixes the problem.
The patch fixes this. Thanks!
Closing as duplicate of bug 31398 *** This bug has been marked as a duplicate of 31398 ***