In the following code IDEA correctly highlight "set" method call but the suggested quickfix will replace "List<T>" parameter type with "List<Integer>" so "set" method will be broken.
import java.util.List;
public class X<T> {
private List<T> myList;
public void set(List<T> list) {
myList = list;
}
publicstatic void aa() {
X<Integer> x = new X<Integer>();
x.set(null, "aaa");
}
}
Description
In the following code IDEA correctly highlight "set" method call but the suggested quickfix will replace "List<T>" parameter type with "List<Integer>" so "set" method will be broken.
import java.util.List;
public class X<T> {
private List<T> myList;
public void set(List<T> list) {
myList = list;
}
publicstatic void aa() {
X<Integer> x = new X<Integer>();
x.set(null, "aaa");
}
}