jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java
changeset 26037 508779ce6619
parent 26007 dba8f49653ce
parent 25859 3317bb8137f4
child 29513 643ff69483e8
--- a/jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java	Mon Aug 18 14:03:21 2014 +0100
+++ b/jdk/src/java.desktop/unix/classes/sun/awt/X11FontManager.java	Tue Aug 19 10:32:16 2014 -0700
@@ -1,3 +1,28 @@
+/*
+ * Copyright (c) 2009, 2014, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
 package sun.awt;
 
 import java.awt.GraphicsEnvironment;
@@ -29,7 +54,7 @@
 /**
  * The X11 implementation of {@link FontManager}.
  */
-public class X11FontManager extends SunFontManager {
+public final class X11FontManager extends SunFontManager {
 
     // constants identifying XLFD and font ID fields
     private static final int FOUNDRY_FIELD = 1;
@@ -129,8 +154,6 @@
       */
      private static String[] fontdirs = null;
 
-    private static String[] defaultPlatformFont = null;
-
     private FontConfigManager fcManager = null;
 
     public static X11FontManager getInstance() {
@@ -768,11 +791,9 @@
         return getFontPathNative(noType1Fonts);
     }
 
-    public String[] getDefaultPlatformFont() {
-        if (defaultPlatformFont != null) {
-            return defaultPlatformFont;
-        }
-        String[] info = new String[2];
+    @Override
+    protected String[] getDefaultPlatformFont() {
+        final String[] info = new String[2];
         getFontConfigManager().initFontConfigFonts(false);
         FontConfigManager.FcCompFont[] fontConfigFonts =
             getFontConfigManager().getFontConfigFonts();
@@ -798,8 +819,7 @@
                 info[1] = "/dialog.ttf";
             }
         }
-        defaultPlatformFont = info;
-        return defaultPlatformFont;
+        return info;
     }
 
     public synchronized FontConfigManager getFontConfigManager() {