Bug 77844 CCE in UnimplementedMethodsCompletionProposal for X implements Set<String>
3.1 M3 Test pass - class X implements Set<String> {} - QuickFix Log: !ENTRY org.eclipse.ui 4 0 2004-11-04 16:45:43.786 !MESSAGE java.lang.ClassCastException !STACK 0 java.lang.ClassCastException at org.eclipse.jdt.core.dom.ASTNode.checkNewChild(ASTNode.java:1865) at org.eclipse.jdt.core.dom.ASTNode$NodeList.add(ASTNode.java:1242) at java.util.AbstractList.add(AbstractList.java:102) at org.eclipse.jdt.internal.ui.text.correction.UnimplementedMethodsCompletionProposal.createNewMethodDeclaration(UnimplementedMethodsCompletionProposal.java:101) at org.eclipse.jdt.internal.ui.text.correction.UnimplementedMethodsCompletionProposal.getRewrite(UnimplementedMethodsCompletionProposal.java:83) at org.eclipse.jdt.internal.ui.text.correction.ASTRewriteCorrectionProposal.addEdits(ASTRewriteCorrectionProposal.java:61) at org.eclipse.jdt.internal.ui.text.correction.CUCorrectionProposal.initializeTextChange(CUCorrectionProposal.java:135) at org.eclipse.jdt.internal.ui.text.correction.UnimplementedMethodsCompletionProposal.getAdditionalProposalInfo(UnimplementedMethodsCompletionProposal.java:259) at org.eclipse.jface.text.contentassist.AdditionalInfoController.computeInformation(AdditionalInfoController.java:221) at org.eclipse.jface.text.AbstractInformationControlManager.doShowInformation(AbstractInformationControlManager.java:761) at org.eclipse.jface.text.AbstractInformationControlManager.showInformation(AbstractInformationControlManager.java:751) at org.eclipse.jface.text.contentassist.AdditionalInfoController$1.run(AdditionalInfoController.java:173) at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35) at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:118) at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:2771) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2451) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1527) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1498) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:276) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:58) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:60) at java.lang.reflect.Method.invoke(Method.java:391) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688)
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/UnimplementedMethodsCompletionProposal.java
import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
import org.eclipse.jdt.internal.corext.codemanipulation.ImportRewrite;
import org.eclipse.jdt.internal.corext.codemanipulation.StubUtility;
import org.eclipse.jdt.internal.corext.dom.ASTNodeFactory;
import org.eclipse.jdt.internal.corext.dom.ASTNodes;
import org.eclipse.jdt.internal.corext.dom.Bindings;
import org.eclipse.jdt.internal.ui.JavaPlugin;
import org.eclipse.jdt.internal.ui.JavaPluginImages;
import org.eclipse.jdt.internal.ui.preferences.JavaPreferencesSettings;
public class UnimplementedMethodsCompletionProposal extends ASTRewriteCorrectionProposal {
	private ASTNode fTypeNode;
	private IMethodBinding[] fMethodsToOverride;
	public UnimplementedMethodsCompletionProposal(ICompilationUnit cu, ASTNode typeNode, int relevance) {
		super("", cu, null, relevance, null); 
		setDisplayName(CorrectionMessages.getString("UnimplementedMethodsCompletionProposal.description"));
		setImage(JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE));
		
		fTypeNode= typeNode;
		fMethodsToOverride= null;
	}
	
	/* (non-Javadoc)
	 * @see org.eclipse.jdt.internal.ui.text.correction.ASTRewriteCorrectionProposal#getRewrite()
	 */
	protected ASTRewrite getRewrite() throws CoreException {
		ITypeBinding binding;
		AST ast= fTypeNode.getAST();
		
		ASTRewrite rewrite= ASTRewrite.create(ast);
		ListRewrite listRewrite;