Project: JDT
Bug 82992 NullPointerException during "pull up" refactoring
Reported: 2005-01-17 12:27:12 | Status: resolved fixed

In 3.1M4, NullPointerException occurs in JDT when attempting a Refactoring "pull up" operation. Here is the error log: !ENTRY org.eclipse.ltk.ui.refactoring 4 10000 2005-01-17 09:01:23.765 !MESSAGE Internal Error !STACK 0 java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:303) at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:824) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.internalPerformFinish (RefactoringWizard.java:539) at org.eclipse.ltk.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:153) at org.eclipse.jdt.internal.ui.refactoring.PullUpWizard$PullUpInputPage2.performFi nish(PullUpWizard.java:1158) at org.eclipse.ltk.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:605) at org.eclipse.jface.wizard.WizardDialog.finishPressed (WizardDialog.java:670) at org.eclipse.ltk.internal.ui.refactoring.RefactoringWizardDialog.finishPressed (RefactoringWizardDialog.java:92) at org.eclipse.jface.wizard.WizardDialog.buttonPressed (WizardDialog.java:342) at org.eclipse.jface.dialogs.Dialog$2.widgetSelected(Dialog.java:543) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:89) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2803) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2448) at org.eclipse.jface.window.Window.runEventLoop(Window.java:718) at org.eclipse.jface.window.Window.open(Window.java:696) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation$1.run (RefactoringWizardOpenOperation.java:125) at org.eclipse.swt.custom.BusyIndicator.showWhile (BusyIndicator.java:69) at org.eclipse.ltk.ui.refactoring.RefactoringWizardOpenOperation.run (RefactoringWizardOpenOperation.java:138) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:40) at org.eclipse.jdt.ui.actions.PullUpAction.startRefactoring (PullUpAction.java:213) at org.eclipse.jdt.ui.actions.PullUpAction.run(PullUpAction.java:152) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:216) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:188) at org.eclipse.jface.action.Action.runWithEvent(Action.java:989) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection (ActionContributionItem.java:555) at org.eclipse.jface.action.ActionContributionItem.access$2 (ActionContributionItem.java:505) at org.eclipse.jface.action.ActionContributionItem$6.handleEvent (ActionContributionItem.java:419) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2803) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2448) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1569) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1540) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:285) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:220) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:129) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.eclipse.core.launcher.Main.basicRun(Main.java:185) at org.eclipse.core.launcher.Main.run(Main.java:710) at org.eclipse.core.launcher.Main.main(Main.java:694) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.dom.ASTNodes.getParent (ASTNodes.java:395) at org.eclipse.jdt.internal.corext.refactoring.structure.ASTNodeSearchUtil.getBody DeclarationNode(ASTNodeSearchUtil.java:142) at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor$ IncomingMemberVisibilityAdjustment.rewriteVisibility (MemberVisibilityAdjustor.java:175) at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor$ IncomingMemberVisibilityAdjustment.rewriteVisibility (MemberVisibilityAdjustor.java:195) at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor. rewriteVisibility(MemberVisibilityAdjustor.java:1094) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.createC hangeManager(PullUpRefactoring.java:1065) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkFi nalConditions(PullUpRefactoring.java:688) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run (CheckConditionsOperation.java:84) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:114) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:188) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1674) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run (WorkbenchRunnableAdapter.java:58) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:105) Root exception: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.dom.ASTNodes.getParent (ASTNodes.java:395) at org.eclipse.jdt.internal.corext.refactoring.structure.ASTNodeSearchUtil.getBody DeclarationNode(ASTNodeSearchUtil.java:142) at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor$ IncomingMemberVisibilityAdjustment.rewriteVisibility (MemberVisibilityAdjustor.java:175) at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor$ IncomingMemberVisibilityAdjustment.rewriteVisibility (MemberVisibilityAdjustor.java:195) at org.eclipse.jdt.internal.corext.refactoring.structure.MemberVisibilityAdjustor. rewriteVisibility(MemberVisibilityAdjustor.java:1094) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.createC hangeManager(PullUpRefactoring.java:1065) at org.eclipse.jdt.internal.corext.refactoring.structure.PullUpRefactoring.checkFi nalConditions(PullUpRefactoring.java:688) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run (CheckConditionsOperation.java:84) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:114) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:188) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1674) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run (WorkbenchRunnableAdapter.java:58) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run (ModalContext.java:105)

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