Project: JDT
Bug 35556 [Refactoring] NPE upon inlining method
Reported: 2003-03-24 04:25:34 | Status: verified fixed

Eclipse 2.1 RC3a When inlining a method I get (after some time of work) the following stacktrace. Is there any tracing I can turn on to find out which class it's currently working on? -- snip -- java.lang.reflect.InvocationTargetException: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.code.flow.LocalFlowInfo.<init> (LocalFlowInfo.java:21) at org.eclipse.jdt.internal.corext.refactoring.code.flow.FlowAnalyzer.endVisitPreP ostfixExpression(FlowAnalyzer.java:845) at org.eclipse.jdt.internal.corext.refactoring.code.flow.FlowAnalyzer.endVisit (FlowAnalyzer.java:640) at org.eclipse.jdt.core.dom.PrefixExpression.accept0 (PrefixExpression.java:178) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:1423) at org.eclipse.jdt.core.dom.MethodInvocation.accept0 (MethodInvocation.java:95) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:1400) at org.eclipse.jdt.core.dom.ExpressionStatement.accept0 (ExpressionStatement.java:81) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:1423) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:81) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:1400) at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:95) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:1423) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:81) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:1400) at org.eclipse.jdt.core.dom.IfStatement.accept0(IfStatement.java:95) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.core.dom.ASTNode.acceptChildren(ASTNode.java:1423) at org.eclipse.jdt.core.dom.Block.accept0(Block.java:81) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.core.dom.ASTNode.acceptChild(ASTNode.java:1400) at org.eclipse.jdt.core.dom.MethodDeclaration.accept0 (MethodDeclaration.java:178) at org.eclipse.jdt.core.dom.ASTNode.accept(ASTNode.java:1353) at org.eclipse.jdt.internal.corext.refactoring.code.flow.InputFlowAnalyzer.doPerfo rm(InputFlowAnalyzer.java:117) at org.eclipse.jdt.internal.corext.refactoring.code.flow.InputFlowAnalyzer.perform (InputFlowAnalyzer.java:109) at org.eclipse.jdt.internal.corext.refactoring.code.CallInliner.flowAnalysis (CallInliner.java:143) at org.eclipse.jdt.internal.corext.refactoring.code.CallInliner.perform (CallInliner.java:154) at org.eclipse.jdt.internal.corext.refactoring.code.InlineMethodRefactoring.checkI nput(InlineMethodRefactoring.java:220) at org.eclipse.jdt.internal.ui.refactoring.CheckConditionsOperation.run (CheckConditionsOperation.java:65) at org.eclipse.jdt.internal.ui.refactoring.CreateChangeOperation.run (CreateChangeOperation.java:100) at org.eclipse.jdt.internal.ui.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:138) at org.eclipse.jface.operation.ModalContext.runInCurrentThread (ModalContext.java:302) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:252) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.run (RefactoringWizardDialog2.java:266) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactori ng(PerformRefactoringUtil.java:53) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:363) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:119) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:426) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:383) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:256) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:423) at org.eclipse.swt.widgets.TypedListener.handleEvent (TypedListener.java:91) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1842) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1549) at org.eclipse.jface.window.Window.runEventLoop(Window.java:583) at org.eclipse.jface.window.Window.open(Window.java:563) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:70) at org.eclipse.jdt.internal.ui.refactoring.actions.InlineMethodAction.activate (InlineMethodAction.java:128) at org.eclipse.jdt.internal.ui.refactoring.actions.InlineMethodAction.run (InlineMethodAction.java:121) at org.eclipse.jdt.internal.ui.refactoring.actions.InlineMethodAction.run (InlineMethodAction.java:82) at org.eclipse.jdt.ui.actions.InlineAction.tryInlineMethod (InlineAction.java:132) at org.eclipse.jdt.ui.actions.InlineAction.run(InlineAction.java:109) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:193) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:169) at org.eclipse.jface.action.Action.runWithEvent(Action.java:842) at org.eclipse.ui.internal.WWinKeyBindingService.pressed (WWinKeyBindingService.java:214) at org.eclipse.ui.internal.WWinKeyBindingService$5.widgetSelected (WWinKeyBindingService.java:328) at org.eclipse.ui.internal.AcceleratorMenu$2.handleEvent (AcceleratorMenu.java:65) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:81) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:840) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1842) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1549) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1402) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1385) at org.eclipse.core.internal.boot.InternalBootLoader.run (InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:461) at java.lang.reflect.Method.invoke(Native Method) at org.eclipse.core.launcher.Main.basicRun(Main.java:291) at org.eclipse.core.launcher.Main.run(Main.java:747) at org.eclipse.core.launcher.Main.main(Main.java:583)

Files changed in fix:
org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/FlowAnalyzer.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/flow/LocalFlowInfo.java