src/share/classes/sun/font/AttributeValues.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 2004, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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

@@ -408,11 +408,11 @@
         }
         return result;
     }
 
     public Hashtable<Object, Object> toSerializableHashtable() {
-        Hashtable ht = new Hashtable();
+        Hashtable<Object, Object> ht = new Hashtable<>();
         int hashkey = defined;
         for (int m = defined, i = 0; m != 0; ++i) {
             EAttribute ea = EAttribute.atts[i];
             if ((m & ea.mask) != 0) {
                 m &= ~ea.mask;

@@ -796,11 +796,11 @@
                 hl = (InputMethodHighlight)imHighlight;
             } else {
                 hl = (InputMethodHighlight)((Annotation)imHighlight).getValue();
             }
 
-            Map imStyles = hl.getStyle();
+            Map<TextAttribute, ?> imStyles = hl.getStyle();
             if (imStyles == null) {
                 Toolkit tk = Toolkit.getDefaultToolkit();
                 imStyles = tk.mapInputMethodHighlight(hl);
             }
 

@@ -810,10 +810,11 @@
         }
 
         return this;
     }
 
+    @SuppressWarnings("unchecked")
     public static AffineTransform getBaselineTransform(Map<?, ?> map) {
         if (map != null) {
             AttributeValues av = null;
             if (map instanceof AttributeMap &&
                 ((AttributeMap) map).getValues() != null) {

@@ -826,10 +827,11 @@
             }
         }
         return null;
     }
 
+    @SuppressWarnings("unchecked")
     public static AffineTransform getCharTransform(Map<?, ?> map) {
         if (map != null) {
             AttributeValues av = null;
             if (map instanceof AttributeMap &&
                 ((AttributeMap) map).getValues() != null) {