Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 302832

Summary: [change method signature] could be smarter about generic types
Product: [Eclipse Project] JDT Reporter: Michael Schneider <michschn>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r
Version: 3.6   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Michael Schneider CLA 2010-02-14 17:27:14 EST
Build Identifier: I20100129-1300

Assume the following code

public class Foo<T> {
	void foo(List<T> arg) {
	}
}

class Bar extends Foo<String> {
	@Override
	void foo(List<String> arg) {
	}
}

1) go to Foo#foo and start the change method signature refactoring
2) change the signature to Set<T>
3) click finish

observe: the refactoring warns about errors
expected: the refactoring should have inferred the generic type String out of Bar and rewrite the method to 
void foo(Set<String> arg) {


Reproducible: Always
Comment 1 Markus Keller CLA 2010-02-15 05:11:31 EST

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