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.

Bug 61337 - ClassCastException on ListViewDropSupport
Summary: ClassCastException on ListViewDropSupport
Alias: None
Product: platform
Classification: Unclassified
Component: Explorer (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Petr Nejedly
Depends on:
Reported: 2005-07-25 10:46 UTC by dzehavi
Modified: 2008-12-23 11:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description dzehavi 2005-07-25 10:46:51 UTC
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);
Comment 1 dzehavi 2005-07-25 10:50:53 UTC
Sorry, typo: I receive a ClassCastException at line
156 of ListViewDropSupport and not of ListViewDragSupport
Comment 2 Petr Nejedly 2005-08-10 12:35:37 UTC
Obvious bug...
Comment 3 Petr Nejedly 2005-08-10 14:24:40 UTC