Bug 77404 [Navigator] ArrayStoreException thrown by NavigatorDropAdapter.getSelecetdResources
I20041101 Select a method in the Outline view Drag it over the Navigator view NavigatorDropAdapter.getSelectedResources throws the following exception (which is currently quitely eaten by the SWT DND mechanism but in the very near future this exception will be thrown): java.lang.ArrayStoreException at java.util.AbstractCollection.toArray(AbstractCollection.java:174) at org.eclipse.ui.views.navigator.NavigatorDropAdapter.getSelectedResources (NavigatorDropAdapter.java:136) at org.eclipse.ui.views.navigator.NavigatorDropAdapter.validateTarget (NavigatorDropAdapter.java:379) at org.eclipse.ui.views.navigator.NavigatorDropAdapter.validateDrop (NavigatorDropAdapter.java:355) at org.eclipse.jface.viewers.ViewerDropAdapter.doDropValidation (ViewerDropAdapter.java:169) at org.eclipse.jface.viewers.ViewerDropAdapter.dragOver (ViewerDropAdapter.java:215) at org.eclipse.swt.dnd.DNDListener.handleEvent(DNDListener.java:59) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:800) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:824) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:809) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:617) at org.eclipse.swt.dnd.DropTarget.notifyListeners(DropTarget.java:511) at org.eclipse.swt.dnd.DropTarget.DragOver(DropTarget.java:338) at org.eclipse.swt.dnd.DropTarget.access$5(DropTarget.java:314) at org.eclipse.swt.dnd.DropTarget$3.method4(DropTarget.java:234) at org.eclipse.swt.internal.ole.win32.COMObject.callback4(COMObject.java:97) at org.eclipse.swt.internal.ole.win32.COM.DoDragDrop(Native Method) at org.eclipse.swt.dnd.DragSource.drag(DragSource.java:287) at org.eclipse.swt.dnd.DragSource.access$0(DragSource.java:267) at org.eclipse.swt.dnd.DragSource$1.handleEvent(DragSource.java:161) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:82) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:800) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:2794) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2448) at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1527) at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1498) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:276) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:144) at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplication.java:102) at org.eclipse.core.internal.runtime.PlatformActivator$1.run (PlatformActivator.java:335) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:273) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:129) 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:185) at org.eclipse.core.launcher.Main.run(Main.java:704) at org.eclipse.core.launcher.Main.main(Main.java:688)
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/navigator/NavigatorDropAdapter.java
else {
                CopyFilesAndFoldersOperation operation;
                if (lastValidOperation == DND.DROP_COPY) {
                    operation = new CopyFilesAndFoldersOperation(getShell());
                } else {
                    operation = new MoveFilesAndFoldersOperation(getShell());
                }
                message = operation.validateDestination(destination,
                        selectedResources);
            }
        } 
        else if (FileTransfer.getInstance().isSupportedType(transferType)) {
            String[] sourceNames = (String[]) FileTransfer.getInstance()
                    .nativeToJava(transferType);
            if (sourceNames == null) {
                
                
                sourceNames = new String[0];
            }
            CopyFilesAndFoldersOperation copyOperation = new CopyFilesAndFoldersOperation(
                    getShell());
            message = copyOperation.validateImportDestination(destination,
                    sourceNames);
        }
        if (message != null) {
            return error(message);
        }
        return ok();
    }
}