Project: JDT
Bug 185214 [inline] Inlining generic local variable to raw value fails to add necessary cast
Reported: 2007-05-02 15:58:23 | Status: resolved fixed

import java.util.List; public class InlineTest { public void inlineTest(List list) { List<String> genericList = list; for (String string : genericList) ; } } After inlining genericList, the resulting expression in the for loop is not cast to List<String>, causing an error: import java.util.List; public class InlineTest { public void inlineTest(List list) { for (String string : list) ; } }

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test33_in.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test33_out.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test34_in.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test34_out.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test35_in.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test35_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineTempTests.java org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/dom/ASTNodes.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineTempRefactoring.java