Bug 404702 - [1.8][extract interface] Extract Interface with receiver parameter doesn't update parameter type
Summary: [1.8][extract interface] Extract Interface with receiver parameter doesn't up...
Status: CLOSED DUPLICATE of bug 405270
Alias: None
Product: JDT
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.3   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: BETA J8   Edit
Assignee: Martin Mathew CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-04-02 04:46 EDT by Martin Mathew CLA
Modified: 2013-09-06 00:07 EDT (History)
1 user (show)

See Also:
manju656: review? (markus.kell.r)


Attachments
Patch. (10.81 KB, patch)
2013-04-09 04:25 EDT, Martin Mathew CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Mathew CLA 2013-04-02 04:46:02 EDT
public class TestExtractInterface {
	
	public void foo(TestExtractInterface this){
		//invoke "Extract Interface" on this method
	}

}

Invoke "Extract Interface" on #foo. Enter the interface name and select the method #foo to be part of the new interface declaration. Click OK.
The new interface is created with compiler error as the abstract method #foo still refers to the old receiver parameter.
Comment 1 Martin Mathew CLA 2013-04-09 04:25:16 EDT
Created attachment 229487 [details]
Patch.

While performing "Extract Interface", methods with receiver parameter are now updated.
While testing found that the current logic which finds the type occurrence consider receiver parameter as a possible candidate that needs to be updated. This resulted in updating the method's return type. Fixed this issue.
Comment 2 Martin Mathew CLA 2013-09-06 00:07:33 EDT
The issue is handled as part of the fix for bug 405270.

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