Project: JDT
Bug 135697 Exception while refactoring (Extract Interface)
Reported: 2006-04-08 06:08:03 | Status: resolved fixed

While extracting interface from a class I got internal error. I'm sorry I can't provide a test case. Regards, Max java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:350) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.run(RefactoringWizardDialog2.java:304) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish(RefactoringWizard.java:545) at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish(UserInputWizardPage.java:154) at org.eclipse.jdt.internal.ui.refactoring.ExtractInterfaceWizard$ExtractInterfaceInputPage.performFinish(ExtractInterfaceWizard.java:367) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish(RefactoringWizard.java:611) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog2.okPressed(RefactoringWizardDialog2.java:433) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:500) at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:652) at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3158) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2838) at org.eclipse.jface.window.Window.runEventLoop(Window.java:820) at org.eclipse.jface.window.Window.open(Window.java:796) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run(RefactoringWizardOpenOperation.java:132) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:69) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run(RefactoringWizardOpenOperation.java:145) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate(RefactoringStarter.java:40) at org.eclipse.jdt.internal.corext.refactoring.RefactoringExecutionStarter.startExtractInterfaceRefactoring(RefactoringExecutionStarter.java:236) at org.eclipse.jdt.ui.actions.ExtractInterfaceAction.run(ExtractInterfaceAction.java:145) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:271) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:243) at org.eclipse.jface.action.Action.runWithEvent(Action.java:499) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:539) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:488) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:400) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1074) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3158) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2838) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:143) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:95) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:376) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:169) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:589) at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336) at org.eclipse.core.launcher.Main.basicRun(Main.java:280) at org.eclipse.core.launcher.Main.run(Main.java:977) at org.eclipse.core.launcher.Main.main(Main.java:952) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeConstraintsModel.createVariableVariable(SuperTypeConstraintsModel.java:494) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeConstraintsCreator.endVisit(SuperTypeConstraintsCreator.java:378) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeConstraintsCreator.endVisit(SuperTypeConstraintsCreator.java:305) at org.eclipse.jdt.core.dom.FieldAccess.accept0(FieldAccess.java:196) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:239) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:239) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:244) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:188) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.ForStatement.accept0(ForStatement.java:228) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:501) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:483) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeRefactoringProcessor.performFirstPass(SuperTypeRefactoringProcessor.java:700) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeRefactoringProcessor$3.acceptAST(SuperTypeRefactoringProcessor.java:1118) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:706) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:459) at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:708) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeRefactoringProcessor.solveSuperTypeConstraints(SuperTypeRefactoringProcessor.java:1112) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor.access$8(ExtractInterfaceProcessor.java:1) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor$3.acceptAST(ExtractInterfaceProcessor.java:1035) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:706) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:459) at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:708) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor.rewriteTypeOccurrences(ExtractInterfaceProcessor.java:1017) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor.createChangeManager(ExtractInterfaceProcessor.java:401) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor.checkFinalConditions(ExtractInterfaceProcessor.java:233) at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:174) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:83) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:118) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:189) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1737) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) Root exception: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeConstraintsModel.createVariableVariable(SuperTypeConstraintsModel.java:494) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeConstraintsCreator.endVisit(SuperTypeConstraintsCreator.java:378) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeConstraintsCreator.endVisit(SuperTypeConstraintsCreator.java:305) at org.eclipse.jdt.core.dom.FieldAccess.accept0(FieldAccess.java:196) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:239) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:239) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.MethodInvocation.accept0(MethodInvocation.java:244) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:188) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.ForStatement.accept0(ForStatement.java:228) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:135) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:2513) at org.eclipse.jdt.core.dom.MethodDeclaration.accept0(MethodDeclaration.java:501) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.TypeDeclaration.accept0(TypeDeclaration.java:483) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:2536) at org.eclipse.jdt.core.dom.CompilationUnit.accept0(CompilationUnit.java:212) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:2466) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeRefactoringProcessor.performFirstPass(SuperTypeRefactoringProcessor.java:700) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeRefactoringProcessor$3.acceptAST(SuperTypeRefactoringProcessor.java:1118) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:706) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:459) at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:708) at org.eclipse.jdt.internal.corext.refactoring.structure.constraints.SuperTypeRefactoringProcessor.solveSuperTypeConstraints(SuperTypeRefactoringProcessor.java:1112) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor.access$8(ExtractInterfaceProcessor.java:1) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor$3.acceptAST(ExtractInterfaceProcessor.java:1035) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:706) at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:459) at org.eclipse.jdt.core.dom.ASTParser.createASTs(ASTParser.java:708) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor.rewriteTypeOccurrences(ExtractInterfaceProcessor.java:1017) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor.createChangeManager(ExtractInterfaceProcessor.java:401) at org.eclipse.jdt.internal.corext.refactoring.structure.ExtractInterfaceProcessor.checkFinalConditions(ExtractInterfaceProcessor.java:233) at org.eclipse.ltk.core.refactoring.participants.ProcessorBasedRefactoring.checkFinalConditions(ProcessorBasedRefactoring.java:174) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:83) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:118) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run(PerformChangeOperation.java:189) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1737) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113) Session data: eclipse.buildId=I20060331-2000 java.version=1.6.0-beta java.vendor=Sun Microsystems Inc. BootLoader constants: OS=linux, ARCH=x86, WS=gtk, NL=en_US Command-line arguments: -os linux -ws gtk -arch x86

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/structure/constraints/SuperTypeConstraintsCreator.java