After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 324161 - ClassCastException in instantiating a SimpleList
ClassCastException in instantiating a SimpleList
Status: RESOLVED FIXED
Product: java-gnome
Classification: Bindings
Component: GTK
mainline
Other All
: High critical
: ---
Assigned To: java-gnome bindings maintainers
java-gnome bindings maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-15 10:25 UTC by Bodo-Merle Sandor
Modified: 2006-01-09 03:02 UTC
See Also:
GNOME target: ---
GNOME version: 2.11/2.12


Attachments
SimpleList ClassCastException fix. (2.34 KB, patch)
2005-12-15 10:27 UTC, Bodo-Merle Sandor
none Details | Review

Description Bodo-Merle Sandor 2005-12-15 10:25:28 UTC
Steps to reproduce:
1. Just instantiate a SimpleList.
2. 
3. 


Stack trace:


Other information:
Because SimpleList extends Widget seems that calling
TreeView.getTreeView(getHandle()) results in ClassCastException, because
getHandle() returns not the TreeView's handle passed to super but the Handle
associated with SimpleList itself.

A patch that turn SimpleList to use a static factory method follows.
Comment 1 Bodo-Merle Sandor 2005-12-15 10:27:59 UTC
Created attachment 56021 [details] [review]
SimpleList ClassCastException fix.

switch SimpleList creation to a static factory method.
Comment 2 Ismael Juma 2006-01-09 02:59:54 UTC
Thanks for the report and patch. It turns out that we don't need a new factory method here. Based on your patch, I simply changed the static factory method to be the public constructor and created the TreeView inside a this call. Fixed in CVS HEAD.