Project: JDT
Bug 206025 [inline] NPE when inlining
Reported: 2007-10-11 07:18:28 | Status: resolved fixed

3.4 20071011 - inline 'activate' in 'foo' public class RefactoringStarter { public boolean activate(String wizard) { return true; } public boolean activate(Object refactoring, String wizard) { String wizard1= wizard; return activate(wizard1); } private void foo() { if (this != null) activate(new Object(), new String()); } } java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.code.CallInliner.replaceCall(CallInliner.java:636) at org.eclipse.jdt.internal.corext.refactoring.code.CallInliner.perform(CallInliner.java:481) at org.eclipse.jdt.internal.corext.refactoring.code.InlineMethodRefactoring.checkFinalConditions(InlineMethodRefactoring.java:294) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:83) at org.eclipse.ltk.core.refactoring.CreateChangeOperation.run(CreateChangeOperation.java:119) at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:1799) at org.eclipse.ltk.internal.ui.refactoring.WorkbenchRunnableAdapter.run(WorkbenchRunnableAdapter.java:87) at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:113)

Files changed in fix:
org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/controlStatement_in/TestIfWithVariable.java org.eclipse.jdt.ui.tests.refactoring/resources/InlineMethodWorkspace/TestCases/controlStatement_out/TestIfWithVariable.java org.eclipse.jdt.ui.tests.refactoring/test cases/org/eclipse/jdt/ui/tests/refactoring/InlineMethodTests.java org.eclipse.jdt.ui/core refactoring/org/eclipse/jdt/internal/corext/refactoring/code/CallInliner.java