--- old/src/macosx/classes/sun/font/CFontConfiguration.java 2014-07-01 17:26:37.000000000 -0700 +++ new/src/macosx/classes/sun/font/CFontConfiguration.java 2014-07-01 17:26:37.000000000 -0700 @@ -106,6 +106,6 @@ @Override protected void initReorderMap() { - reorderMap = new HashMap(); + reorderMap = new HashMap<>(); } } --- old/src/solaris/classes/sun/font/FcFontConfiguration.java 2014-07-01 17:26:37.000000000 -0700 +++ new/src/solaris/classes/sun/font/FcFontConfiguration.java 2014-07-01 17:26:37.000000000 -0700 @@ -170,7 +170,7 @@ @Override protected void initReorderMap() { - reorderMap = new HashMap(); + reorderMap = new HashMap<>(); } @Override --- old/src/solaris/classes/sun/font/XMap.java 2014-07-01 17:26:38.000000000 -0700 +++ new/src/solaris/classes/sun/font/XMap.java 2014-07-01 17:26:37.000000000 -0700 @@ -37,7 +37,7 @@ class XMap { - private static HashMap xMappers = new HashMap(); + private static HashMap xMappers = new HashMap<>(); /* ConvertedGlyphs has unicode code points as indexes and values * are platform-encoded multi-bytes chars packed into java chars. @@ -49,7 +49,7 @@ 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); --- old/src/solaris/classes/sun/font/XRGlyphCache.java 2014-07-01 17:26:38.000000000 -0700 +++ new/src/solaris/classes/sun/font/XRGlyphCache.java 2014-07-01 17:26:38.000000000 -0700 @@ -190,20 +190,23 @@ for (XRGlyphCacheEntry cacheEntry : glyphList) { if (cacheEntry.isGrayscale(containsLCDGlyphs)) { if (grayGlyphs == null) { - grayGlyphs = new ArrayList(glyphList.size()); + grayGlyphs = new ArrayList<>(glyphList.size()); } cacheEntry.setGlyphSet(grayGlyphSet); grayGlyphs.add(cacheEntry); } else { if (lcdGlyphs == null) { - lcdGlyphs = new ArrayList(glyphList.size()); + lcdGlyphs = new ArrayList<>(glyphList.size()); } cacheEntry.setGlyphSet(lcdGlyphSet); lcdGlyphs.add(cacheEntry); } } - - return new List[] { grayGlyphs, lcdGlyphs }; + // Arrays and generics don't play well together + @SuppressWarnings({"unchecked", "rawtypes"}) + List[] tmp = + (List[]) (new List[] { grayGlyphs, lcdGlyphs }); + return tmp; } /**