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
* @param shell the shell for any dialogs
	 * @param name the string used as the name for the action, 
	 *   or <code>null</code> if there is no name
	 */
	CopyResourceAction(Shell shell, String name) {
		super(name);
		setToolTipText(IDEWorkbenchMessages.getString("CopyResourceAction.toolTip")); 
		setId(CopyResourceAction.ID);
		if (shell == null) {
			throw new IllegalArgumentException();
		}
		this.shell = shell;
	}
	/**
	 * Returns the operation to perform when this action runs.
	 * 
	 * @return the operation to perform when this action runs.
	 */
	protected CopyFilesAndFoldersOperation createOperation() {
		return new CopyFilesAndFoldersOperation(getShell());
	}
	/**
	 * Returns the path of the container to initially select in the container
	 * selection dialog, or <code>null</code> if there is no initial selection
	 */
	IContainer getInitialContainer() {
		List resources = getSelectedResources();
		if (resources.size() > 0) {
			IResource resource = (IResource) resources.get(0);
			return resource.getParent();