jdk/src/java.desktop/share/classes/java/awt/Font.java
changeset 30469 bac0a7ff7e1e
parent 26749 b6598aa90114
child 30471 c1568a2416a8
--- a/jdk/src/java.desktop/share/classes/java/awt/Font.java	Fri Apr 17 12:32:46 2015 -0700
+++ b/jdk/src/java.desktop/share/classes/java/awt/Font.java	Fri Apr 17 16:54:13 2015 +0300
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1995, 2015, 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
@@ -41,7 +41,6 @@
 import java.security.PrivilegedExceptionAction;
 import java.text.AttributedCharacterIterator.Attribute;
 import java.text.CharacterIterator;
-import java.text.StringCharacterIterator;
 import java.util.Hashtable;
 import java.util.Locale;
 import java.util.Map;
@@ -239,6 +238,11 @@
         public boolean isCreatedFont(Font font) {
             return font.createdFont;
         }
+
+        @Override
+        public FontPeer getFontPeer(final Font font) {
+            return font.getFontPeer();
+        }
     }
 
     static {
@@ -434,24 +438,15 @@
     private static final long serialVersionUID = -4206021311591459213L;
 
     /**
-     * Gets the peer of this <code>Font</code>.
-     * @return  the peer of the <code>Font</code>.
-     * @since 1.1
-     * @deprecated Font rendering is now platform independent.
+     * Gets the peer of this {@code Font}.
+     *
+     * @return the peer of the {@code Font}.
      */
-    @Deprecated
-    public FontPeer getPeer(){
-        return getPeer_NoClientCode();
-    }
-    // NOTE: This method is called by privileged threads.
-    //       We implement this functionality in a package-private method
-    //       to insure that it cannot be overridden by client subclasses.
-    //       DO NOT INVOKE CLIENT CODE ON THIS THREAD!
     @SuppressWarnings("deprecation")
-    final FontPeer getPeer_NoClientCode() {
+    private FontPeer getFontPeer() {
         if(peer == null) {
             Toolkit tk = Toolkit.getDefaultToolkit();
-            this.peer = tk.getFontPeer(name, style);
+            peer = tk.getFontPeer(name, style);
         }
         return peer;
     }