Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 332669

Summary: [search]overridden method with generic parameter not found in search
Product: [Eclipse Project] JDT Reporter: Brian Chaplin <brian.chaplin>
Component: CoreAssignee: Satyam Kandula <satyam.kandula>
Status: VERIFIED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: amj87.iitr, daniel_megert, jarthana
Version: 3.6   
Target Milestone: 3.8 M6   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Brian Chaplin CLA 2010-12-15 13:48:58 EST
Build Identifier: 20100917-0705

if sub class overrides a super class's method which contains a generic paramter when I search the workspace or invoke open call hierarchy on the sub class's method, the search does not find it

example:

super class

MySuperClass<T> {
protected void myMethod(final T parm) { }

private void test() {
this.myMethod(null);
}
}

MySubClass<Object> extends MySuperClass

@Override
protected void myMethod(Object parm) { }

when I search for callers of MySubClass.myMethod the search does not find
MySuperClass.test

If I remove the generic parameter from the signature, it will be found correctly.


Reproducible: Always

Steps to Reproduce:
1. create 2 Java classes:
MySuperClass<T> {
protected void myMethod(final T parm) { }

private void test() {
this.myMethod(null);
}
}

MySubClass<Object> extends MySuperClass

@Override
protected void myMethod(Object parm) { }


2. search for callers of MySubClass.myMethod via Open Call Hiearchy or References Workspace

3. remove the generic parameter from the signature, it will be found correctly.
Comment 1 Satyam Kandula CLA 2010-12-16 06:33:13 EST
This is similar to bug 123836

*** This bug has been marked as a duplicate of bug 123836 ***
Comment 2 Jay Arthanareeswaran CLA 2012-03-13 10:37:01 EDT
Verified for 3.8 M6 using build I20120312-1800