Bug 50493 [Commands] NPE double-clicking on a source folder
Using 0121, I got this exception double-clicking on a source folder. java.lang.NullPointerException at org.eclipse.ui.actions.CopyResourceAction.updateSelection(CopyResourceAction.java:223) at org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChanged(BaseSelectionListenerAction.java:102) at org.eclipse.ui.actions.BaseSelectionListenerAction.selectionChanged(BaseSelectionListenerAction.java:115) at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.selectionChanged(PackageExplorerActionGroup.java:172) at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:159) at org.eclipse.core.internal.runtime.InternalPlatform.run(InternalPlatform.java:842) at org.eclipse.core.runtime.Platform.run(Platform.java:458) at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer.java:157) at org.eclipse.jface.viewers.StructuredViewer.updateSelection(StructuredViewer.java:1310) at org.eclipse.jface.viewers.StructuredViewer.handleDoubleSelect(StructuredViewer.java:597) at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:693) at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:187) at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:184) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:231) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:833) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2340) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2021) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1530) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1506) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:265) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:139) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:47) at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:248) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:85) 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:279) at org.eclipse.core.launcher.Main.run(Main.java:742) at org.eclipse.core.launcher.Main.main(Main.java:581) I don't have steps to reproduce it all the time.
bundles/org.eclipse.ui.ide/extensions/org/eclipse/ui/actions/CopyResourceAction.java
protected CopyFilesAndFoldersOperation operation;
	/**
	 * Returns a new name for a copy of the resource at the given path in the given
	 * workspace. This name could be determined either automatically or by querying
	 * the user. This name will <b>not</b> be verified by the caller, so it must be
	 * valid and unique.
	 * <p>
	 * Note this method is for internal use only.
	 * </p>
	 *
	 * @param originalName the full path of the resource
	 * @param workspace the workspace
	 * @return the new full path for the copy, or <code>null</code> if the resource
	 *   should not be copied
	 */
	public static IPath getNewNameFor(IPath originalName, IWorkspace workspace) {
		return CopyFilesAndFoldersOperation.getAutoNewNameFor(originalName, workspace);
	}
	/**
	 * Creates a new action.
	 *
	 * @param shell the shell for any dialogs
	 */
	public CopyResourceAction(Shell shell) {
		this(shell, IDEWorkbenchMessages.getString("CopyResourceAction.title")); 
		WorkbenchHelp.setHelp(this, IHelpContextIds.COPY_RESOURCE_ACTION);
	}
	/**
	 * Creates a new action with the given text.
	 *