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 65665

Summary: ClassCastException while editing layer-in-context
Product: apisupport Reporter: mdaniel <mdaniel>
Component: ProjectAssignee: Jesse Glick <jglick>
Status: VERIFIED FIXED    
Severity: blocker Keywords: SIMPLEFIX
Priority: P3    
Version: 5.x   
Hardware: PC   
OS: Windows XP   
Issue Type: DEFECT Exception Reporter:

Description mdaniel 2005-10-03 05:05:07 UTC
Clicked the + next to "Favorites" and was rewarded with the following stack 
trace, which continued after every OK to dismiss the Exception box:

java.lang.ClassCastException: java.net.URL
	at org.netbeans.modules.apisupport.project.layers.BadgingSupport.
annotateNameGeneral(BadgingSupport.java:149)
	at org.netbeans.modules.apisupport.project.layers.BadgingSupport.
annotateName(BadgingSupport.java:98)
	at org.netbeans.modules.apisupport.project.layers.LayerNode$4.
annotateNameHtml(LayerNode.java:172)
	at org.openide.loaders.DataShadow$ShadowNode.
getHtmlDisplayName(DataShadow.java:802)
	at org.openide.explorer.view.VisualizerNode.
getHtmlDisplayName(VisualizerNode.java:512)
	at org.openide.explorer.view.NodeRenderer.
getTreeCellRendererComponent(NodeRenderer.java:100)
	at javax.swing.plaf.basic.BasicTreeUI$NodeDimensionsHandler.
getNodeDimensions(BasicTreeUI.java:2643)
	at javax.swing.tree.AbstractLayoutCache.
getNodeDimensions(AbstractLayoutCache.java:475)
	at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.
updatePreferredSize(VariableHeightLayoutCache.java:1342)
	at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.
getXOrigin(VariableHeightLayoutCache.java:1125)
	at javax.swing.tree.VariableHeightLayoutCache$TreeStateNode.
getNodeBounds(VariableHeightLayoutCache.java:1108)
	at javax.swing.tree.VariableHeightLayoutCache.
getBounds(VariableHeightLayoutCache.java:202)
	at javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:501)
	at javax.swing.JTree.getPathBounds(JTree.java:1642)
[catch] at org.openide.explorer.view.TreeView$1Request.run(TreeView.java:1107)
	at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
	at java.awt.EventDispatchThread.
pumpOneEventForHierarchy(EventDispatchThread.java:234)
	at java.awt.EventDispatchThread.
pumpEventsForHierarchy(EventDispatchThread.java:163)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
Comment 1 Jesse Glick 2005-10-03 22:45:05 UTC
True, didn't realize anyone would be using URL values for attr in layers...

Can reproduce in a unit test.
Comment 2 Jesse Glick 2005-10-04 06:46:53 UTC
committed   * Up-To-Date  1.9        
apisupport/project/src/org/netbeans/modules/apisupport/project/layers/BadgingSupport.java
committed   * Up-To-Date  1.15       
apisupport/project/test/unit/src/org/netbeans/modules/apisupport/project/layers/LayerUtilsTest.java
Comment 3 Tomas Danek 2005-12-02 14:06:13 UTC
not reproducible in current builds -> verified.