Community
Participate
Working Groups
In our project we have a class B in package BP that inherits from class A in package AP. Class A has an protected method M1. Class B has an inner class BIC that calls method AP. Eclipse couldn't compile class B and I get the error that the method AP is not visible. But it compiles, when I compile it only with JDK 1.3.1 and without eclipse. This seems to be a bug in eclipse.
Sorry, I think my description was unprecise, so here is an code example: ------------- package AP; public abstract class A { protected AIC memberA; protected class AIC { public void methodAIC(String paramater) { // ....do something } } } ------------- ------------- package BP; public class B extends AP.A { private class BIC { public void methodBIC(String param) { memberA.methodAIC(param); } } } ------------- In ecplise I get the error that the methode 'methodAIC' in 'methodeBIC' ist not visible.
Reproduced. Indeed, this sounds like our bug.
We had implemented the proper visibility check, but left in the old one which was still being used in this case. Removing the old code is now running through the new code (similar to field and method visibility check). Need to re-run jcks to assess quality. This is quite unfortunate.
Fixed in latest internal.
*** Bug 22149 has been marked as a duplicate of this bug. ***
Verified.
Verified
Verified in 2.1 M1.