<AWT Dev> [9] Review request for JDK-8046391: Hang displaying JFileChooser with Windows L&F

Alexey Ivanov alexey.ivanov at oracle.com
Tue Jun 10 15:21:56 UTC 2014

Hello AWT team,

Could you please review the fix for bug:
     bug: https://bugs.openjdk.java.net/browse/JDK-8046391
     webrev: http://cr.openjdk.java.net/~aivanov/8046391/jdk9/webrev.01/

The fix for JDK-8039383 "NPE when changing Windows Theme" caused a 
regression where JFileChooser hung. The root cause is the deadlock 
between Windows Toolkit thread and AWT Event Queue which is caused by 
the fact that ThemeReader.flush() is called on the toolkit thread.

The fix:
Modify ThemeReader so that flush() does not do the real work but marks 
the current state as invalid. The old theme data are removed when 
getTheme() is called which is done only from an Event Dispatch thread.


More information about the awt-dev mailing list