bug-classpath
[Top][All Lists]
Advanced

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

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


From: pere at hungry dot com
Subject: [Bug swing/27651] New: ClassCastException via javax.swing.tree.TreePath.isDescendant()
Date: 17 May 2006 22:25:46 -0000

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)
   at javax.swing.JTree.getExpandedDescendants(JTree.java:2859)
   at
javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(BasicTreeUI.java:1118)
   at javax.swing.plaf.basic.BasicTreeUI.installUI(BasicTreeUI.java:1357)
   at javax.swing.plaf.metal.MetalTreeUI.installUI(MetalTreeUI.java:107)
   at javax.swing.JComponent.setUI(JComponent.java:3045)
   at javax.swing.JTree.setUI(JTree.java:1622)
   at javax.swing.JTree.updateUI(JTree.java:1630)
   at javax.swing.JTree.setModel(JTree.java:1910)
   at
com.vividsolutions.jump.workbench.ui.addremove.TreeAddRemoveList.setModel(TreeAddRemoveList.java:85)
   at
com.vividsolutions.jump.workbench.ui.plugin.wms.MapLayerPanel.init(MapLayerPanel.java:314)
   at
com.vividsolutions.jump.workbench.ui.plugin.wms.MapLayerWizardPanel.enteredFromLeft(MapLayerWizardPanel.java:97)
   at
com.vividsolutions.jump.workbench.ui.wizard.WizardDialog.nextButton_actionPerformed(WizardDialog.java:286)
   at
com.vividsolutions.jump.workbench.ui.wizard.WizardDialog$3.actionPerformed(WizardDialog.java:213)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1099)
   at javax.swing.AbstractButton$1.actionPerformed(AbstractButton.java:1909)
   at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:298)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:403)
   at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:188)
   at java.awt.Component.processMouseEvent(Component.java:3105)
   at java.awt.Component.processEvent(Component.java:2964)
   at java.awt.Container.processEvent(Container.java:914)
   at java.awt.Component.dispatchEventImpl(Component.java:5033)
   at java.awt.Container.dispatchEventImpl(Container.java:1741)
   at java.awt.Component.dispatchEvent(Component.java:2322)
   at
java.awt.LightweightDispatcher.handleMouseEvent(LightweightDispatcher.java:234)
   at
java.awt.LightweightDispatcher.dispatchEvent(LightweightDispatcher.java:116)
   at java.awt.Container.dispatchEventImpl(Container.java:1731)
   at java.awt.Window.dispatchEventImpl(Window.java:642)
   at java.awt.Component.dispatchEvent(Component.java:2322)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:474)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:95)
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)
   at javax.swing.JTree.getExpandedDescendants(JTree.java:2859)
   at
javax.swing.plaf.basic.BasicTreeUI.updateExpandedDescendants(BasicTreeUI.java:1118)
   at javax.swing.plaf.basic.BasicTreeUI.installUI(BasicTreeUI.java:1357)
   at javax.swing.plaf.metal.MetalTreeUI.installUI(MetalTreeUI.java:107)
   at javax.swing.JComponent.setUI(JComponent.java:3045)
   at javax.swing.JTree.setUI(JTree.java:1622)
   at javax.swing.JTree.updateUI(JTree.java:1630)
   at javax.swing.JTree.setModel(JTree.java:1910)
   at
com.vividsolutions.jump.workbench.ui.addremove.TreeAddRemoveList.setModel(TreeAddRemoveList.java:85)
   at
com.vividsolutions.jump.workbench.ui.plugin.wms.MapLayerPanel.init(MapLayerPanel.java:314)
   at
com.vividsolutions.jump.workbench.ui.plugin.wms.MapLayerWizardPanel.enteredFromLeft(MapLayerWizardPanel.java:97)
   at
com.vividsolutions.jump.workbench.ui.wizard.WizardDialog.nextButton_actionPerformed(WizardDialog.java:286)
   at
com.vividsolutions.jump.workbench.ui.wizard.WizardDialog$3.actionPerformed(WizardDialog.java:213)
   at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1099)
   at javax.swing.AbstractButton$1.actionPerformed(AbstractButton.java:1909)
   at
javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:298)
   at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:403)
   at
javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:188)
   at java.awt.Component.processMouseEvent(Component.java:3105)
   at java.awt.Component.processEvent(Component.java:2964)
   at java.awt.Container.processEvent(Container.java:914)
   at java.awt.Component.dispatchEventImpl(Component.java:5033)
   at java.awt.Container.dispatchEventImpl(Container.java:1741)
   at java.awt.Component.dispatchEvent(Component.java:2322)
   at
java.awt.LightweightDispatcher.handleMouseEvent(LightweightDispatcher.java:234)
   at
java.awt.LightweightDispatcher.dispatchEvent(LightweightDispatcher.java:116)
   at java.awt.Container.dispatchEventImpl(Container.java:1731)
   at java.awt.Window.dispatchEventImpl(Window.java:642)
   at java.awt.Component.dispatchEvent(Component.java:2322)
   at java.awt.EventQueue.dispatchEvent(EventQueue.java:474)
   at java.awt.EventDispatchThread.run(EventDispatchThread.java:95)

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;

              return layer == other.layer;
          }
      [...]
      }
  }

I run openjump in Debian using this command line, using the CVS
verison of GNU Classpath:

  JAVACMD="/usr/bin/jamvm" \
    JAVA_ARGS="-Dgnu.java.awt.peer.gtk.Graphics=Graphics2D -Xms256M -Xmx256M" \
    openjump


-- 
           Summary: ClassCastException via
                    javax.swing.tree.TreePath.isDescendant()
           Product: classpath
           Version: unspecified
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: swing
        AssignedTo: roman at kennke dot org
        ReportedBy: pere at hungry dot com


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





reply via email to

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