<Swing Dev> [9] Fix for JDK-6567433 : JComponent.updateUI() may create StackOverflowError
Ajit Ghaisas
ajit.ghaisas at oracle.com
Tue Jul 5 11:51:08 UTC 2016
Hi,
Bug :
https://bugs.openjdk.java.net/browse/JDK-6567433
Calling updateUI() on JList, JComboBox and JTableHeader can create StackOverflowErrors.
For example -
JList.updateUI() invokes updateUI() on its Cellrenderer via SwingUtilities.updateComponentTreeUI().
If the cellrenderer is a parent of this JList the method recurses endless causing StackOverflowError.
Fix :
Added a recursion guard to JComboBox, JList and JTableHeader classes.
With this fix, UpdateUI() method in these classes does not result in recursion.
Webrev :
http://cr.openjdk.java.net/~aghaisas/6567433/webrev.00/
Request you to review.
Regards,
Ajit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openjdk.java.net/pipermail/swing-dev/attachments/20160705/2bdf7ecf/attachment.html>
More information about the swing-dev
mailing list