Project: JDT
Bug 84807 Introduce Factory: strange generation of source code
Reported: 2005-02-09 13:25:32 | Status: resolved fixed

Example: public class X<T> { public X(T t) { } } class call { void foo() { X<String> x= new X<String>("Eclipse"); } } - select X in "new X<String>("Eclipse"); - introduce factory produces: public class X<T> { public static X<String> createX<String>(String arg1){return new X<String>(arg1);} public X(T t) { } } class call { void foo() { X<String> x= X.createX < String > ("Eclipse"); } } which doesn't compile.

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceFactory/Bugzilla/84807/CtorOfParamType.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceFactory/Bugzilla/84807/CtorOfParamType_out.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/IntroduceFactoryTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/IntroduceFactoryRefactoring.java