Project: JDT
Bug 239887 [quick fix] CCE in ReturnTypeSubProcessor for enum.
Reported: 2008-07-07 17:33:03 | Status: resolved fixed

Build ID: I20080617-2000 (3.4.0) Steps To Reproduce: Please click on the quickfix to cause the crash below to appear in the error log. --------------- Bug.java ----------------- enum Bug {X; wrap(){} } More information: java.lang.ClassCastException: org.eclipse.jdt.core.dom.EnumDeclaration cannot be cast to org.eclipse.jdt.core.dom.TypeDeclaration at org.eclipse.jdt.internal.ui.text.correction.ReturnTypeSubProcessor.addMissingReturnTypeProposals(ReturnTypeSubProcessor.java:272) at org.eclipse.jdt.internal.ui.text.correction.QuickFixProcessor.process(QuickFixProcessor.java:332)

Files changed in fix:
org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/quickfix/ReturnTypeQuickFixTest.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/correction/ReturnTypeSubProcessor.java