Bug 59832 Bindings.findMethodDefininition(binding) finds wrong definition
I20040422 0800 1) Enabled annotation roll-overs 2) Create the following type: package p1; public class A { void doit() { } } 3) Create a subclass in a different package: package p2; import p1.A; public class B extends A { void doit() { // } } I get two roll-overs in the editor next to B.doit: - "The method B.doit() does not override the inherited method from A since it is private to a different package" - "overrides P1.A.doit" These statements contradict eath other.
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ModifierCorrectionSubProcessor.java
if (!(selectedNode instanceof MethodDeclaration)) {
			return;
		}
		
		IMethodBinding method= ((MethodDeclaration) selectedNode).resolveBinding();
		ITypeBinding curr= method.getDeclaringClass();
		IMethodBinding overriddenClass= null;
		
		
		if (overriddenClass == null && curr.getSuperclass() != null) {
			curr= curr.getSuperclass();
			overriddenClass= Bindings.findMethodInType(curr, method.getName(), method.getParameterTypes());
		}
		if (overriddenClass != null) {
			ICompilationUnit targetCU= ASTResolving.findCompilationUnitForBinding(cu, context.getASTRoot(), curr);
			if (targetCU != null) {
				String methodName= curr.getName() + '.' + overriddenClass.getName();
				String label;
				int excludedModifiers;
				int includedModifiers;			
				switch (kind) {
					case TO_VISIBLE:
						excludedModifiers= Modifier.PRIVATE | Modifier.PROTECTED | Modifier.PUBLIC;
						includedModifiers= method.getModifiers() & (Modifier.PROTECTED | Modifier.PUBLIC);
						label= CorrectionMessages.getFormattedString("ModifierCorrectionSubProcessor.changeoverriddenvisibility.description", new String[] { methodName, getVisibilityString(includedModifiers) }); 
						break;
					case TO_NON_FINAL:	
						label= CorrectionMessages.getFormattedString("ModifierCorrectionSubProcessor.changemethodtononfinal.description", methodName); 
						excludedModifiers= Modifier.FINAL;
						includedModifiers= 0;