Project: JDT
Bug 277968 [inline] Inline local variable gets type parameters on static methods wrong
Reported: 2009-05-26 19:26:28 | Status: resolved fixed

Build ID: I20090522-1710 java.version=1.6.0_13 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_GB Command-line arguments: -os win32 -ws win32 -arch x86_64 Steps To Reproduce: 1. Create a class like: class InlineMethodParam { String foo() { String t = bar(); return t; } static <T> T bar() { return null; } } 2. Attempt to inline t. 3. You'll get: return <String>bar(); To be legal, you need return InlineMethodParam.<String>bar();.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test37_in.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test37_out.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test38_in.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test38_out.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test39_in.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineTemp/canInline/A_test39_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineTempTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineConstantRefactoring.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/InlineTempRefactoring.java