6816582: WindowsFileChooserUI throws NullPointer when awt.useSystemAAFontSettings=false
authorrupashka
Mon, 25 Oct 2010 18:25:47 +0400
changeset 7009 cd2a85b8534b
parent 7008 0bac31837ad2
child 7010 324a3db27d8f
6816582: WindowsFileChooserUI throws NullPointer when awt.useSystemAAFontSettings=false Reviewed-by: uta
jdk/src/share/classes/java/awt/Toolkit.java
--- a/jdk/src/share/classes/java/awt/Toolkit.java	Fri Oct 22 11:32:26 2010 -0700
+++ b/jdk/src/share/classes/java/awt/Toolkit.java	Mon Oct 25 18:25:47 2010 +0400
@@ -1831,7 +1831,11 @@
             desktopProperties.put(name, newValue);
         }
 
-        desktopPropsSupport.firePropertyChange(name, oldValue, newValue);
+        // Don't fire change event if old and new values are null.
+        // It helps to avoid recursive resending of WM_THEMECHANGED
+        if (oldValue != null || newValue != null) {
+            desktopPropsSupport.firePropertyChange(name, oldValue, newValue);
+        }
     }
 
     /**