Project: JDT
Bug 135816 [introduce indirection] NPE in when invoken on declaration
Reported: 2006-04-10 04:52:35 | Status: resolved fixed

20060410-0010 - open the following code in the editor, select method declaration 'run' in 'MyThread' and invoke the introduce indirection refactoring. public class ThreadRunner { private static class MyThread extends Thread { public void run() { } } public void startInBackground() { MyThread thread= new MyThread(); thread.run(); } } java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.code.IntroduceIndirectionRefactoring.checkInitialConditions(IntroduceIndirectionRefactoring.java:408) at org.eclipse.ltk.core.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:81) 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)

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