Community
Participate
Working Groups
Eclipse M8: On certain projects if I try deleting a java file through the package explorer I get an NPE. If I try and deleting through the navigator it works fine: ---------------------------------------------------------------- java.lang.NullPointerException at org.eclipse.jdt.internal.corext.refactoring.changes.DeleteSourceManipulationChan ge.doDelete(DeleteSourceManipulationChange.java:89) at org.eclipse.jdt.internal.corext.refactoring.changes.AbstractDeleteChange.perform (AbstractDeleteChange.java:30) at org.eclipse.ltk.core.refactoring.CompositeChange.perform (CompositeChange.java:249) at org.eclipse.jdt.internal.corext.refactoring.changes.ValidationStateChange.access $1(ValidationStateChange.java:1) at org.eclipse.jdt.internal.corext.refactoring.changes.ValidationStateChange$2.run (ValidationStateChange.java:174) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation (BatchOperation.java:34) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:700) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1559) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3196) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3153) at org.eclipse.jdt.internal.corext.refactoring.changes.ValidationStateChange.perfor m(ValidationStateChange.java:177) at org.eclipse.jdt.internal.corext.refactoring.reorg.DeleteChangeCreator$1.perform (DeleteChangeCreator.java:67) at org.eclipse.ltk.core.refactoring.CompositeChange.perform (CompositeChange.java:249) at org.eclipse.ltk.core.refactoring.PerformChangeOperation$1.run (PerformChangeOperation.java:190) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation (BatchOperation.java:34) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:700) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1559) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3196) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3153) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.executeChange (PerformChangeOperation.java:224) at org.eclipse.ltk.core.refactoring.PerformChangeOperation.run (PerformChangeOperation.java:161) at org.eclipse.jdt.internal.core.BatchOperation.executeOperation (BatchOperation.java:34) at org.eclipse.jdt.internal.core.JavaModelOperation.run (JavaModelOperation.java:700) at org.eclipse.core.internal.resources.Workspace.run (Workspace.java:1559) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3196) at org.eclipse.jdt.core.JavaCore.run(JavaCore.java:3153) at org.eclipse.jdt.internal.ui.actions.WorkbenchRunnableAdapter.run (WorkbenchRunnableAdapter.java:50) 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:271) at org.eclipse.jdt.internal.ui.refactoring.PerformRefactoringUtil.performRefactorin g(PerformRefactoringUtil.java:37) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:411) at org.eclipse.jdt.internal.ui.refactoring.UserInputWizardPage.performFinish (UserInputWizardPage.java:121) at org.eclipse.jdt.internal.ui.refactoring.reorg.DeleteWizard$DeleteInputPage.perfo rmFinish(DeleteWizard.java:145) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizard.performFinish (RefactoringWizard.java:474) at org.eclipse.jdt.internal.ui.refactoring.RefactoringWizardDialog2.okPressed (RefactoringWizardDialog2.java:395) at org.eclipse.jface.dialogs.Dialog.buttonPressed(Dialog.java:274) at org.eclipse.jface.dialogs.Dialog$1.widgetSelected(Dialog.java:413) 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:769) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2578) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2256) at org.eclipse.jface.window.Window.runEventLoop(Window.java:670) at org.eclipse.jface.window.Window.open(Window.java:650) at org.eclipse.jdt.internal.ui.refactoring.actions.RefactoringStarter.activate (RefactoringStarter.java:62) at org.eclipse.jdt.internal.ui.refactoring.UserInterfaceStarter.activate (UserInterfaceStarter.java:53) at org.eclipse.jdt.internal.ui.refactoring.reorg.DeleteAction.run (DeleteAction.java:95) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun (SelectionDispatchAction.java:212) at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run (SelectionDispatchAction.java:188) at org.eclipse.jface.action.Action.runWithEvent(Action.java:881) at org.eclipse.ui.actions.RetargetAction.runWithEvent (RetargetAction.java:212) at org.eclipse.ui.commands.ActionHandler.execute(ActionHandler.java:68) at org.eclipse.ui.internal.commands.Command.execute(Command.java:173) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.executeCommand (WorkbenchKeyboard.java:463) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.press (WorkbenchKeyboard.java:855) at org.eclipse.ui.internal.keys.WorkbenchKeyboard.processKeyEvent (WorkbenchKeyboard.java:896) at org.eclipse.ui.internal.keys.OutOfOrderListener.handleEvent (OutOfOrderListener.java:67) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:769) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:793) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:778) at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1720) at org.eclipse.swt.widgets.Control.sendKeyEvent(Control.java:1716) at org.eclipse.swt.widgets.Control.WM_KEYDOWN(Control.java:3487) at org.eclipse.swt.widgets.Tree.WM_KEYDOWN(Tree.java:1343) at org.eclipse.swt.widgets.Control.windowProc(Control.java:2971) at org.eclipse.swt.widgets.Display.windowProc(Display.java:3146) at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method) at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1450) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2254) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1562) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1536) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench (Workbench.java:257) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run (IDEApplication.java:90) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:277) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:239) at org.eclipse.core.runtime.adaptor.EclipseStarter.run (EclipseStarter.java:117) 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:267) at org.eclipse.core.launcher.Main.run(Main.java:692) at org.eclipse.core.launcher.Main.main(Main.java:676)
Strange, since the element to be deleted should never be null. Nikolay, do you have a reproducable test case for this. This would be really help.
I debuged the workspace and the problem is that the project I am using is called "Common (11070200)". The "(" is causing getHandleFromMemento() not to work.
Nikolay, thanks for debugging the workspace.
The method comes from JDT/Core. Philippe, can we address this for M9 ?
We did have problems in the past with parenthesis in project names (during indexing), looks like this is another one of these...
this is probably a duplicate of Bug 47815
Indeed, smells like dup. *** This bug has been marked as a duplicate of 47815 ***