Bug 85347 - [search] finds references to Object.toString when searching for X.toString
Summary: [search] finds references to Object.toString when searching for X.toString
Status: RESOLVED 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: ---   Edit
Assignee: Frederic Fusier CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-15 17:42 EST by Neil Cannon CLA
Modified: 2005-08-05 03:56 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 Neil Cannon CLA 2005-02-15 17:42:58 EST
When searching for refs to method toString() in class X, search also finds
refrences to toString() methods on other classes (e.g. java.io.File). This seems
to only happen with methods that exist in java.lang.Object (?)
Is this expected behavior?
Seen on 3.1M4
Comment 1 Frederic Fusier CLA 2005-03-14 15:18:28 EST
If time permit
Comment 2 Frederic Fusier CLA 2005-04-26 07:54:42 EDT
What build did you use?
How exactly did you perform your search ?
I cannot reproduce with following test case (with JDT/Core HEAD or M6 content):
public class X {
	public String toString() {
		return "X";
	}
	void foo() {
		new X().toString();
	}
}
and searching for toString() references.
I find only one reference when I use search from popup-menu (same result with
workspace or project scope).
Using string pattern (ie. with Search dialog), I get one match when I search on
project scope and get multiple ones when I search on entire workspace scope
(which is normal behavior).

Please reopen with exact test case if you still can get it or close if not...

PS: There's no reference to toString() method in java.io.File, so I guess you
meant that you also found references to java.io.File.toString() methods, correct?
Comment 3 Frederic Fusier CLA 2005-08-05 03:41:54 EDT
Reopen to set as duplicate
Comment 4 Frederic Fusier CLA 2005-08-05 03:42:40 EDT
Assume this a similar case than bug 105768

*** This bug has been marked as a duplicate of 105768 ***
Comment 5 Frederic Fusier CLA 2005-08-05 03:56:08 EDT
Reopen to change duplicate
Comment 6 Frederic Fusier CLA 2005-08-05 03:56:23 EDT

*** This bug has been marked as a duplicate of 73401 ***