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 180088 - ClassCastException: java.lang.String cannot be cast to org.netbeans.modules.hudson.api.HudsonInstance
Summary: ClassCastException: java.lang.String cannot be cast to org.netbeans.modules.h...
Status: VERIFIED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Hudson (show other bugs)
Version: 6.x
Hardware: All All
: P2 normal (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-02-01 07:59 UTC by Jindrich Sedek
Modified: 2010-05-26 07:18 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 164785


Attachments
stacktrace (5.41 KB, text/plain)
2010-02-01 07:59 UTC, Jindrich Sedek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jindrich Sedek 2010-02-01 07:59:12 UTC
Build: NetBeans IDE Dev (Build 100201-3fc727840087)
VM: Java HotSpot(TM) 64-Bit Server VM, 16.0-b13, Java(TM) SE Runtime Environment, 1.6.0_18-b06
OS: Linux

User Comments:
jsedek: just invoked Create a Job in Team main menu




Stacktrace: 
java.lang.ClassCastException: java.lang.String cannot be cast to org.netbeans.modules.hudson.api.HudsonInstance
   at org.netbeans.modules.hudson.ui.actions.CreateJobPanel$ServerRenderer.getListCellRendererComponent(CreateJobPanel.java:424)
   at javax.swing.plaf.basic.BasicComboBoxUI.getBaseline(BasicComboBoxUI.java:960)
   at javax.swing.JComponent.getBaseline(JComponent.java:2532)
   at javax.swing.GroupLayout$ComponentSpring.getBaseline(GroupLayout.java:3000)
   at javax.swing.GroupLayout$BaselineGroup.calculateBaselineAndResizeBehavior(GroupLayout.java:2657)
   at javax.swing.GroupLayout$BaselineGroup.calculateSize(GroupLayout.java:2633)
Comment 1 Jindrich Sedek 2010-02-01 07:59:18 UTC
Created attachment 93718 [details]
stacktrace
Comment 2 Jesse Glick 2010-02-01 12:02:27 UTC
Works for me, and I can't see how it could happen; the combo box only ever holds HudsonInstance instances in its model. Are you using some unusual Swing L&F perhaps? Added some diagnostics: core-main #5307494caa17
Comment 3 Jindrich Sedek 2010-02-02 01:56:45 UTC
I can easily reproduce, just start IDE with fresh userdir and invoke Team/Create Build Job...
Comment 4 Jesse Glick 2010-02-02 09:33:15 UTC
Reproducible iff you have no servers registered and/or no projects opened. Seems to be a bug in BasicComboBoxUI.getBaseline triggered by the use of GroupLayout and could affect any list or combo box with a custom renderer which might sometimes display an empty list. I will file a Swing bug soon. core-main #60071995e98b
Comment 5 Quality Engineering 2010-02-03 21:47:32 UTC
Integrated into 'main-golden', will be available in build *201002040200* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/60071995e98b
User: Jesse Glick <jglick@netbeans.org>
Log: #180088: CCE finding baselines for empty combo boxes.
Comment 6 Jindrich Sedek 2010-02-05 02:59:00 UTC
verified
NetBeans IDE Dev (Build 201002050200)
Comment 7 Quality Engineering 2010-05-26 07:18:31 UTC
Integrated into 'main-golden', will be available in build *201005260001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a0acad65f793
User: Jesse Glick <jglick@netbeans.org>
Log: More workarounds for JDK CCE mentioned in #180088.