src/solaris/classes/sun/awt/motif/MFontConfiguration.java

Print this page
rev 9717 : 8039642: Fix raw and unchecked warnings in sun.awt.*
Reviewed-by:

@@ -65,11 +65,11 @@
 
     /* Needs to be kept in sync with updates in the languages used in
      * the fontconfig files.
      */
     protected void initReorderMap() {
-        reorderMap = new HashMap();
+        reorderMap = new HashMap<>();
         if (osName == null) {  /* null means SunOS */
             initReorderMapForSolaris();
         } else {
             initReorderMapForLinux();
         }

@@ -238,11 +238,11 @@
                 return "sun.awt.motif.X11Dingbats";
             } else if (awtFontName.indexOf("symbol") > 0) {
                 return "sun.awt.Symbol";
             }
         }
-        String encoding = (String) encodingMap.get(xlfdEncoding);
+        String encoding = encodingMap.get(xlfdEncoding);
         if (encoding == null) {
             encoding = "default";
         }
         return encoding;
     }

@@ -286,11 +286,11 @@
         return fontDirs;
     }
 
     /* methods for table setup ***********************************************/
 
-    private static HashMap encodingMap = new HashMap();
+    private static HashMap<String, String> encodingMap = new HashMap<>();
 
     private void initTables() {
         // encodingMap maps XLFD encoding component to
         // name of corresponding java.nio charset
         encodingMap.put("iso8859-1", "ISO-8859-1");