[SWINGX-1356] JXComboBox: throw NPE on toggling LAF Created: 15/Oct/10  Updated: 28/Jan/11  Resolved: 19/Nov/10

Status: Resolved
Project: swingx
Component/s: Misc Component
Affects Version/s: 1.6.2
Fix Version/s: 1.6.3

Type: Bug Priority: Critical
Reporter: kleopatra Assignee: Karl Schaefer
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Operating System: All
Platform: All

Issuezilla Id: 1,356


(don't know since when - reporting from Eclipse-Mylyn, where most current version is 1.6.1++
which probably needs updating, either locally only or in the tracker)

or fails silently - f.i. arrowbutton not showing

to reproduce NPE, run JXComboBoxVisualCheck and toggle LAF

start of stacktrace (when starting with metal, toggle to motif, f.i.)
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at com.sun.java.swing.plaf.motif.MotifComboBoxUI.iconAreaWidth(MotifComboBoxUI.java:228)
at com.sun.java.swing.plaf.motif.MotifComboBoxUI.rectangleForCurrentValue(MotifComboBoxUI.java:211)
at com.sun.java.swing.plaf.motif.MotifComboBoxUI.paint(MotifComboBoxUI.java:128)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:143)
at javax.swing.JComponent.paintComponent(JComponent.java:752)
at javax.swing.JComponent.paint(JComponent.java:1029)

Comment by Karl Schaefer [ 19/Nov/10 ]

Issue 1356: Ensure that the we do not query the UI delegate during update.
Prevents the NPE, which was caused because we accessed the UI delegate during
update prior to complete configuration of the delegate.


Committed revision 3890.

Generated at Thu May 05 20:09:06 UTC 2016 using JIRA 6.2.3#6260-sha1:63ef1d6dac3f4f4d7db4c1effd405ba38ccdc558.