Project: JDT
Bug 86447 Infer Type Arguments should respect existing type arguments
Reported: 2005-02-24 05:02:16 | Status: verified fixed

public class Z { void foo() { List l= new ArrayList(); bar(l); l.add(new Object()); } void bar(List<String> l) { } } In the following example generify converts the list to List<Object> which produces a compile error. We should leave the code unchanged in this example.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InferTypeArguments/testCuExistingParameterized01/in/A.java org.eclipse.jdt.ui.tests.refactoring/resources/InferTypeArguments/testCuExistingParameterized01/out/A.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InferTypeArgumentsTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsConstraintCreator.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/generics/InferTypeArgumentsTCModel.java