<Swing Dev> [9] Fix for JDK-6567433 : JComponent.updateUI() may create StackOverflowError

Andrej Golovnin andrej.golovnin at gmail.com
Thu Jul 7 11:13:36 UTC 2016


Hi Ajit,

one more thing that I have just noticed:

 /**
  * Flag to indicate UI update is in progress
  */
 private boolean updateInProgress;

I think the field must be transient. In Swing every component is
serializable. When updateInProgress is set to true and you
serialize/deserialize the component, then the call of the
#updateUI()-method on the deserialized instance would never update the
UI of the deserialized component because the flag updateInProgress
will never change from true to false.

Best regards,
Andrej Golovnin



More information about the swing-dev mailing list