Project: JDT
Bug 29525 moving source file from one source folder to the other caused NullPointerException
Reported: 2003-01-15 06:50:52 | Status: resolved fixed

Not strictly reproducible, the source folders are in the same project, source and destination package have the same name. This is the complete stack trace, note the contained stack trace starting at: "Caused by: java.lang.NullPointerException" java.lang.reflect.InvocationTargetException at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:307) at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:246) at org.eclipse.jface.window.ApplicationWindow$1.run(ApplicationWindow.java:432) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:65) at org.eclipse.jface.window.ApplicationWindow.run(ApplicationWindow.java:429) at org.eclipse.ui.internal.WorkbenchWindow.run(WorkbenchWindow.java:1174) at org.eclipse.jdt.internal.ui.reorg.JdtMoveAction.doReorg(JdtMoveAction.java:140) at org.eclipse.jdt.internal.ui.reorg.ReorgDestinationAction.run(ReorgDestinationAction.java:116) at org.eclipse.jdt.internal.ui.reorg.JdtMoveAction.run(JdtMoveAction.java:68) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:191) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:169) at org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter.handleDropMove(SelectionTransferDropAdapter.java:238) at org.eclipse.jdt.internal.ui.packageview.SelectionTransferDropAdapter.drop(SelectionTransferDropAdapter.java:142) at org.eclipse.jdt.internal.ui.dnd.JdtViewerDropAdapter.drop(JdtViewerDropAdapter.java:106) at org.eclipse.jdt.internal.ui.dnd.DelegatingDropAdapter.drop(DelegatingDropAdapter.java:73) at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:61) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:861) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:845) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:652) at org.eclipse.swt.dnd.DropTarget.notifyListeners(DropTarget.java:558) at org.eclipse.swt.dnd.DropTarget.Drop(DropTarget.java:495) at org.eclipse.swt.dnd.DropTarget.access$7(DropTarget.java:423) at org.eclipse.swt.dnd.DropTarget$3.method6(DropTarget.java:214) at org.eclipse.swt.internal.ole.win32.COMObject.callback6(COMObject.java:111) at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method) at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:298) at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:279) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:146) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:77) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:836) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:1692) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:1410) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1467) at org.eclipse.ui.internal.Workbench.run(Workbench.java:1450) at org.eclipse.core.internal.boot.InternalBootLoader.run(InternalBootLoader.java:845) at org.eclipse.core.boot.BootLoader.run(BootLoader.java:462) 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:324) at org.eclipse.core.launcher.Main.basicRun(Main.java:247) at org.eclipse.core.launcher.Main.run(Main.java:703) at org.eclipse.core.launcher.Main.main(Main.java:539) Caused by: java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.reorg.MoveRefactoring.checkReferencesToNotPublicTypes(MoveRefactoring.java:108) at org.eclipse.jdt.internal.corext.refactoring.reorg.MoveRefactoring.checkInput(MoveRefactoring.java:82) at org.eclipse.jdt.internal.corext.refactoring.base.Refactoring.checkPreconditions(Refactoring.java:72) at org.eclipse.jdt.internal.ui.refactoring.CheckConditionsOperation.run(CheckConditionsOperation.java:55) at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:296) ... 44 more

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