Bug 246343 - Revisit usages of Bindings.findMethodInHierarchy(ITypeBinding, String, String[])
Summary: Revisit usages of Bindings.findMethodInHierarchy(ITypeBinding, String, String[])
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Text (show other bugs)
Version: 3.5   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Markus Keller CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2008-09-05 05:54 EDT by Markus Keller CLA
Modified: 2019-09-06 16:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Markus Keller CLA 2008-09-05 05:54:30 EDT
HEAD

- have:

package xy;
import java.util.ArrayList;
public class MyList<Element> extends ArrayList<Element> {
    
}

- in the type body, invoke Content Assist and choose 'add(Element): boolean'

=> the inserted code is:
    public boolean add(Element e) {};

=> expected: Same as when I use Source > Override/Implement Methods...:
    @Override
    public boolean add(Element e) {
        return super.add(e);
    }

This is only broken for methods with an argument type that is a type variable. Works fine for contains(Object), get(int), and addAll(Collection<? extends Element>).
Comment 1 Dani Megert CLA 2010-11-15 08:51:51 EST
The OverrideCompletionProposal calls Bindings.findMethodInHierarchy(ITypeBinding, String, String[]) which doesn't handle generics.

Markus, you know that code better than I do. Can you take a look? We should probably replace all usages of that method and eventually get rid of it.
Comment 2 Eclipse Genie CLA 2019-09-06 16:52:49 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.