--- old/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java 2014-04-07 14:54:24.000000000 -0700 +++ new/src/share/classes/java/awt/datatransfer/SystemFlavorMap.java 2014-04-07 14:54:24.000000000 -0700 @@ -176,7 +176,8 @@ * explicitly specified with setFlavorsForNative() or * setNativesForFlavor(). This keeps all such keys. */ - private Set disabledMappingGenerationKeys = new HashSet(); + // Holds String and DataFlavor objects + private Set disabledMappingGenerationKeys = new HashSet<>(); /** * Returns the default FlavorMap for this thread's ClassLoader. @@ -701,7 +702,7 @@ retval = getAllNativesForType(flav.mimeType.getBaseType()); if (retval != null) { // To prevent the List stored in the map from modification. - retval = new ArrayList(retval); + retval = new ArrayList<>(retval); } } @@ -1002,7 +1003,7 @@ // and stringFlavor if (flavors == null) { - List flavor_list = getFlavorsForNative(null); + List flavor_list = getFlavorsForNative(null); flavors = new DataFlavor[flavor_list.size()]; flavor_list.toArray(flavors); } @@ -1047,7 +1048,7 @@ // Use getFlavorsForNative to generate extra flavors for text natives if (natives == null) { - List native_list = getNativesForFlavor(null); + List native_list = getNativesForFlavor(null); natives = new String[native_list.size()]; native_list.toArray(natives); }