FULL PRODUCT VERSION :
1.6.0_10-ea-fastdebug
ADDITIONAL OS VERSION INFORMATION :
Windows XP SP3
A DESCRIPTION OF THE PROBLEM :
NullPointerException appears if an arrow button has no parent.
StackTrace:
Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
at javax.swing.plaf.synth.SynthArrowButton$SynthArrowButtonUI.getPreferredSize(SynthArrowButton.java:105)
at javax.swing.JComponent.getPreferredSize(JComponent.java:1632)
at de.javasoft.plaf.synthetica.StyleFactory.getStyle(StyleFactory.java:286)
at de.javasoft.plaf.synthetica.StyleFactory.getStyle(StyleFactory.java:160)
at javax.swing.plaf.synth.SynthLookAndFeel.getStyle(SynthLookAndFeel.java:211)
at javax.swing.plaf.synth.SynthLookAndFeel.updateStyle(SynthLookAndFeel.java:267)
at javax.swing.plaf.synth.SynthButtonUI.updateStyle(SynthButtonUI.java:53)
at javax.swing.plaf.synth.SynthButtonUI.propertyChange(SynthButtonUI.java:442)
at java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:339)
...
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER SUBMITTED WORKAROUND :
Bugfix proposal: Add a null check against parent before calling parent.getClientProperty()
Reproducible every time with the attached test case on
the optimized build on 6u10 (windows, dual cpu system).
java.lang.NullPointerException
at javax.swing.plaf.synth.SynthArrowButton$SynthArrowButtonUI.getPreferredSize(Unknown Source)
at javax.swing.JComponent.getPreferredSize(Unknown Source)
at SynthArrowButtonTest$StyleFactory.getStyle(SynthArrowButtonTest.java:70)
at javax.swing.plaf.synth.SynthLookAndFeel.getStyle(Unknown Source)
at javax.swing.plaf.synth.SynthLookAndFeel.updateStyle(Unknown Source)
at javax.swing.plaf.synth.SynthButtonUI.updateStyle(Unknown Source)
at javax.swing.plaf.synth.SynthButtonUI.propertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
at java.awt.Component.firePropertyChange(Unknown Source)
at java.awt.Component.setName(Unknown Source)
at javax.swing.plaf.synth.SynthSpinnerUI.createNextButton(Unknown Source)
at javax.swing.plaf.basic.BasicSpinnerUI.installUI(Unknown Source)
at javax.swing.JComponent.setUI(Unknown Source)
at javax.swing.JSpinner.setUI(Unknown Source)
at javax.swing.JSpinner.updateUI(Unknown Source)
at javax.swing.JSpinner.<init>(Unknown Source)
at javax.swing.JSpinner.<init>(Unknown Source)
at SynthArrowButtonTest.<init>(SynthArrowButtonTest.java:47)
at SynthArrowButtonTest$1.run(SynthArrowButtonTest.java:22)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
More info in this thread: http://forums.java.net/jive/thread.jspa?messageID=267364