bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/27651] ClassCastException via javax.swing.tree.TreePath.isDes


From: pinskia at physics dot uc dot edu
Subject: [Bug swing/27651] ClassCastException via javax.swing.tree.TreePath.isDescendant()
Date: 17 May 2006 22:29:28 -0000


------- Comment #1 from pinskia at physics dot uc dot edu  2006-05-17 22:29 
-------
Subject: Re:  New: ClassCastException via

> 
> When running openjump, trying to fetch a map using WMS, I get this
> exception:
> 
> java.lang.ClassCastException: javax/swing/JTree$DynamicUtilTreeNode
>    at
> com.vividsolutions.jump.workbench.ui.plugin.wms.MapLayerTreeModel$LayerNode.equals(MapLayerTreeModel.java:123)
>    at javax.swing.tree.TreePath.isDescendant(TreePath.java:269)
.....
> The throwing code in MapLayerTreeModel.java:123 is this cast to
> LayerNode:
> 
>   public class MapLayerTreeModel extends DefaultTreeModel {
>       [...]
>       public static class LayerNode implements TreeNode, Comparable {
>       [...]
>           public boolean equals(Object o) {
>               //Needed for the #contains check in MapLayerPanel, as well as
> #getIndex. [Jon Aquino]
>               LayerNode other = (LayerNode) o;

I don't think this is a bug in classpath.  equals can take any object type so
this exception is correct.

-- Pinski


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27651





reply via email to

[Prev in Thread] Current Thread [Next in Thread]