This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Dragging an item into a ListView object, I receive a ClassCastException at line 156 of ListViewDragSupport. A look into the drop() method code, reveals what might be the source of that: 140: public void drop (DropTargetDropEvent dtde) { ... 142: int index = list.locationToIndex(dtde.getLocation()); *** NodeListModel.getElementAt() returns a VisualizerNode *** 143: Object obj = list.getModel().getElementAt(index); ... *** This line tries to cast a VisualizerNode into a Node. *** *** => ClassCastException **** 156: PasteType pt = DragDropUtilities.getDropType ((Node)obj, ExplorerDnDManager.getDefault ().getDraggedTransferable ((DnDConstants.ACTION_MOVE & dropAction) != 0), dropAction);
Sorry, typo: I receive a ClassCastException at line 156 of ListViewDropSupport and not of ListViewDragSupport
Obvious bug...
openide/explorer/src/org/openide/explorer/view/ListViewDropSupport.java,v1.2