AutoRefactor
AutoRefactor copied to clipboard
New refactoring - Remove unneeded type parameters
Given
The following code:
public String removeThisAndUselessTypeParameter() {
return this.<Class> notGenericMethod();
}
private String notGenericMethod() {
return null;
}
When
...automated refactorings are applied...
Then
Code should be refactored to:
public String removeThisAndUselessTypeParameter() {
return this.notGenericMethod();
}
private String notGenericMethod() {
return null;
}
This should work with one or several uneeded type parameters. This should also work with method invocation, super method invocation, ... (others?)
See commit 1ec7b78850a9dc9213f539a69e497be1b273f5cb for an inspiration on the JDT APIs to use to solve this bug.