Bug 74776

Summary: [Search] Wrong search results for almost identical method
Product: [Eclipse Project] JDT Reporter: Tom Hofmann <eclipse>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description Tom Hofmann CLA 2004-09-23 10:27:09 EDT
I20040921-2000-gtk

I deprecated a protected method specifying an implementation class rather than
an interface, and forwarded the old method to the new one. 
(from TemplateCompletionProcessor, note Region vs. IRegion):

========== snip ==========
protected ICompletionProposal createProposal(Template t, TemplateContext c,
					     Region r, int rel {
	return createProposal(t, c, (IRegion) r, rel);
}

protected ICompletionProposal createProposal(Template t, TemplateContext c,
					     IRegion r, int rel) {
	return new TemplateProposal(t, c, r, null, rel);
}
===========================

Search and the the Call Hierarchy find that the forwarding call in the first
method is a reference to the first *and* to the second method. It should just
find the second one.
Comment 1 Frederic Fusier CLA 2004-10-14 05:01:17 EDT
Fixed.

Search does not find any match for first (Region) method reference.

[jdt-core-internal]
See patch file put in bug 70827 for changes.
Test case added in JavaSearchTests
Comment 2 David Audel CLA 2004-11-03 06:59:58 EST
Verified for 3.1M3 with build I20041102