Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 240136 - [clean up] Remove 'this' qualifier for non static member access does not work for methods defined in a class more than once with same selector and different parameters
Summary: [clean up] Remove 'this' qualifier for non static member access does not work...
Status: CLOSED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.4   Edit
Hardware: All All
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: JDT-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
: 260253 325420 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-07-09 06:14 EDT by Frederic Fusier CLA
Modified: 2020-03-06 16:20 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Frederic Fusier CLA 2008-07-09 06:14:18 EDT
Using I20080702-0939.

Consider the following test case:
public class X {

	public void foo() {
		this.foo("");
	}
	public void foo(String str) {
	}
	void bar(){
		this.foo();
	}
	void test() {
		this.bar();
	}
}

I run the "Clean Up" "Remove 'this' qualifier for non static member access" on it and get:
public class X {

	public void foo() {
		this.foo("");
	}
	public void foo(String str) {
	}
	void bar(){
		this.foo();
	}
	void test() {
		bar();
	}
}

Note that all this.foo(...) calls were not cleaned up, I would expect them to be as there's absolutely not ambiguity on these calls...

As the test cases showing up, it seems that this issue was due to the fact that the class X defines two 'foo' methods...
Comment 1 Dani Megert CLA 2008-07-09 08:56:45 EDT
Benno, any reason to not remove all 'this'?
Comment 2 Benno Baumgartner CLA 2008-07-09 10:22:13 EDT
(In reply to comment #1)
> Benno, any reason to not remove all 'this'?
> 

No, it looks safe to remove it.
Comment 3 Dani Megert CLA 2009-01-07 09:18:55 EST
*** Bug 260253 has been marked as a duplicate of this bug. ***
Comment 4 Thomas Hammerl CLA 2010-09-16 05:37:40 EDT
*** Bug 325420 has been marked as a duplicate of this bug. ***
Comment 5 Eclipse Genie CLA 2020-03-06 16:20:55 EST
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. As such, we're closing this bug.

If you have further information on the current state of the bug, please add it and reopen this bug. 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.