src/solaris/classes/sun/font/XMap.java

Print this page

        

@@ -35,11 +35,11 @@
 import java.nio.CharBuffer;
 import java.nio.ByteBuffer;
 
 class XMap {
 
-    private static HashMap xMappers = new HashMap();
+    private static HashMap<String, XMap> xMappers = new HashMap<>();
 
     /* ConvertedGlyphs has unicode code points as indexes and values
      * are platform-encoded multi-bytes chars packed into java chars.
      * These platform-encoded characters are equated to glyph ids, although
      * that's not strictly true, as X11 only supports using chars.

@@ -47,11 +47,11 @@
      * a char is big enough to hold an X11 glyph id (ie platform char).
      */
     char[] convertedGlyphs;
 
     static synchronized XMap getXMapper(String encoding) {
-        XMap mapper = (XMap)xMappers.get(encoding);
+        XMap mapper = xMappers.get(encoding);
         if (mapper == null) {
             mapper = getXMapperInternal(encoding);
             xMappers.put(encoding, mapper);
         }
         return mapper;