jdk/src/share/classes/java/awt/Component.java
changeset 21265 d037a0675f8d
parent 20465 b08b3909ee92
child 21278 ef8a3a2a72f2
--- a/jdk/src/share/classes/java/awt/Component.java	Thu Oct 17 20:54:33 2013 +0400
+++ b/jdk/src/share/classes/java/awt/Component.java	Thu Oct 17 21:22:05 2013 +0400
@@ -276,7 +276,7 @@
      * @see #getFont
      * @see #setFont
      */
-    Font        font;
+    volatile Font font;
 
     /**
      * The font which the peer is currently using.
@@ -1885,10 +1885,8 @@
     public void setFont(Font f) {
         Font oldFont, newFont;
         synchronized(getTreeLock()) {
-            synchronized (this) {
-                oldFont = font;
-                newFont = font = f;
-            }
+            oldFont = font;
+            newFont = font = f;
             ComponentPeer peer = this.peer;
             if (peer != null) {
                 f = getFont();