Bug 41716 - Search-Java-References incorrectly identifies method.
Summary: Search-Java-References incorrectly identifies method.
Status: RESOLVED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 3.0 M3   Edit
Assignee: Jerome Lanneluc CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-19 17:47 EDT by MG CLA
Modified: 2003-08-26 12:40 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 MG CLA 2003-08-19 17:47:46 EDT
Find a method in your code say HttpSession.setAttribute("attribute", "hello" + x);
Highlight setAttribute and right click search->java->references.  It will search
the code for references to setAttribute(String, Object) whereas it should search
for setAttribute(String, String);
Comment 1 Dani Megert CLA 2003-08-20 04:40:13 EDT
worked for me using the following example:
public class Test {
	void a(String s, String a) {}
	void a(String s, Object o){}
	
	void doit(){
		a("s", "" + new Test());
		a("s", new Test());
	}		
}

In the UI we do a code resolve and then search for references via J Core API.
Maybe this can be reproduced with code in JARs.
Comment 2 Jerome Lanneluc CLA 2003-08-22 07:36:27 EDT
Not sure I understand the problem: HttpSession has only one method setAttribute 
defined. It takes an Object as the second parameter. So calling it with a 
String can only bind to this method.
Comment 3 Jerome Lanneluc CLA 2003-08-26 12:40:09 EDT
Please reopen if you have more comments.