Project: JDT
Bug 46608 Introduce Factory: internal error
Reported: 2003-11-13 13:41:47 | Status: resolved fixed

I20031111 + Introduce Factory patch Test Case /* * Created on Nov 10, 2003 * * To change the template for this generated file go to * Window - Preferences - Java - Code Generation - Code and Comments */ package p2; /** * @author dbaeumer * * To change the template for this generated type comment go to * Window - Preferences - Java - Code Generation - Code and Comments */ public class TT { public void foo() { new TT(); } public void bar() { new TT(); } } - select TT in foo - introduce factory. !ENTRY org.eclipse.jdt.ui 4 10001 Nov 13, 2003 19:30:44.143 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java:104) at java.lang.reflect.InvocationTargetException.<init> (InvocationTargetException.java:66) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:112) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101) Caused by: Java Model Exception: Java Model Status [Unexpected AST node type for constructor search hit: org.eclipse.jdt.core.dom.SimpleName('Sub')in compilation unit TT.java] at java.lang.Throwable.<init>(Throwable.java) at java.lang.Throwable.<init>(Throwable.java) at org.eclipse.core.runtime.CoreException.<init>(CoreException.java:35) at org.eclipse.jdt.core.JavaModelException.<init> (JavaModelException.java:67) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefactoring.ge tCtorCallAt(IntroduceFactoryRefactoring.java:795) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefactoring.re placeConstructorCalls(IntroduceFactoryRefactoring.java:730) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefactoring.ad dAllChangesFor(IntroduceFactoryRefactoring.java:691) at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceFactoryRefactoring.cr eateChange(IntroduceFactoryRefactoring.java:839) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:104) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:101)

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceFactory/Bugzilla/46608/p1/TT.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceFactory/Bugzilla/46608/p1/TT_out.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceFactory/Bugzilla/46608/p2/TT.java org.eclipse.jdt.ui.tests.refactoring/resources/IntroduceFactory/Bugzilla/46608/p2/TT_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