Project: JDT
Bug 258059 [quick fix] Quick fix suggests invalid List<Object> for "instanceof List"
Reported: 2008-12-09 07:37:52 | Status: resolved fixed

I20081209-0100 1. Paste the following in Package Explorer import java.util.List; public class X { boolean foo() { return null instanceof List; } } 2. You should get a warning: "List is a raw type. References to generic type List<E> should be parameterized" 3. Bring up Quick Fix and choose "Add type arguments to 'List'" 4. You have to choices: - inserting '<?>' (valid suggestion) - inserting '<Object>' (invalid suggestion) If you choose the second suggestion, the resulting code has the following error: "Cannot perform instanceof check against parameterized type List<Object>. Use instead its raw form List since generic type information will be erased at runtime"

Files changed in fix:
org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/fix/Java50Fix.java