Bug 116295 - [Search] Unable to search just for references to deeply overridden method
Summary: [Search] Unable to search just for references to deeply overridden method
Status: VERIFIED DUPLICATE of bug 73401
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M2   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-11-14 13:39 EST by Glen Purdy CLA
Modified: 2007-03-14 12:06 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 :-)