Project: JDT
Bug 303762 [call hierarchy] NPE thrown when trying to copy a non-existent selection in 'Call Hierarchy'
Reported: 2010-02-24 09:45:06 | Status: verified fixed

Build id: I20100216-0800 1. Make a new class and put a method in there. 2. Invoke call hierarchy on it. 3. There are no matches. 4. On the right-hand side, bring up the context menu and select 'Copy'. 5. An NPE is thrown. java.lang.IllegalArgumentException: Argument not valid at org.eclipse.swt.SWT.error(SWT.java:4064) at org.eclipse.swt.SWT.error(SWT.java:3998) at org.eclipse.swt.SWT.error(SWT.java:3969) at org.eclipse.swt.dnd.DND.error(DND.java:281) at org.eclipse.swt.dnd.DND.error(DND.java:227) at org.eclipse.swt.dnd.Clipboard.setContents(Clipboard.java:480) at org.eclipse.swt.dnd.Clipboard.setContents(Clipboard.java:411) at org.eclipse.jdt.internal.ui.callhierarchy.LocationCopyAction.run(LocationCopyAction.java:66) at org.eclipse.jface.action.Action.runWithEvent(Action.java:498) at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:584) at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:501) at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:411) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)

Files changed in fix:
org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/callhierarchy/LocationCopyAction.java