Bug 116295

Summary: [Search] Unable to search just for references to deeply overridden method
Product: [Eclipse Project] JDT Reporter: Glen Purdy <ec23>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3    
Version: 3.1   
Target Milestone: 3.3 M2   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Glen Purdy CLA 2005-11-14 13:39:04 EST
A bug that is slightly different than 73401 (85347, 105768) is the following.  
In the following code, if you request references for B1.foo(), you'll get both 
the D reference to B1.foo() (which is correct) and the C reference to A1.foo() 
(which is not correct).  This happens whether you use the Search|Java menu 
pick or the Search|References|Workspace menu pick.  This only occurs if A does 
not include a definition of foo().

package net.java.refTest;

public class SearchForReferences {
    class TopClass {
        void foo() { };
    }

    class A extends TopClass {
        //public void foo() { }  // Uncomment to get rid of bug
    }

    class B extends TopClass {
        public void foo() {
        }
    }

    class A1 extends A {
    }

    class B1 extends B {
        public void foo() {
        }
    }
    
    class C {
        void bar() {
            new A1().foo();
        }
    }

    class D {
        void bar() {
            new B1().foo();
        }
    }
}
Comment 1 Markus Keller CLA 2007-03-14 11:58:22 EDT
Works as requested in I20070313-1051.

*** This bug has been marked as a duplicate of bug 73401 ***
Comment 2 Frederic Fusier CLA 2007-03-14 12:06:08 EDT
Thanks Markus for the clean-up :-)