Project: JDT
Bug 222392 [quick fix] Infer generic type arguments should not be available if compile errors
Reported: 2008-03-12 07:30:25 | Status: resolved fixed

I20080311-0924 Given: package test; import java.util.ArrayList; public class Other { public void foo() { ArrayList list= new ArrayList(); list.ad d(1); } } 1. Ctlr-1 on ArrayList 2. Add type paremeters Is: org.eclipse.core.runtime.AssertionFailedException: null argument: at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:84) at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:72) at org.eclipse.jdt.internal.corext.refactoring.typeconstraints.types.HierarchyType.initialize(HierarchyType.java:32) ... This is only one example of many, i.e.: package test; import java.util.ArrayList; public class Other { public void foo() { ArrayList list= new Arrayist(); } } The refactoring can not handle compile errors (rsp. missing bindings) at all. It was never designed for this. We need to disable the quick fixes if there is a compile error. The refactoring just skips cus with compile errors.

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