jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java
changeset 11271 f10f98b24801
parent 9484 ef39ea9d781b
child 15993 cdc681a6afd7
--- a/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Mon Dec 19 15:21:35 2011 +0400
+++ b/jdk/src/share/classes/sun/awt/datatransfer/DataTransferer.java	Mon Dec 19 16:44:36 2011 +0400
@@ -649,8 +649,9 @@
      * The map keys are sorted according to the native formats preference
      * order.
      */
-    public SortedMap getFormatsForTransferable(Transferable contents,
-                                               FlavorTable map) {
+    public SortedMap<Long,DataFlavor> getFormatsForTransferable(
+                               Transferable contents, FlavorTable map)
+    {
         DataFlavor[] flavors = contents.getTransferDataFlavors();
         if (flavors == null) {
             return new TreeMap();
@@ -686,9 +687,13 @@
      *            DataFlavors and data formats
      * @throws NullPointerException if flavors or map is <code>null</code>
      */
-    public SortedMap getFormatsForFlavors(DataFlavor[] flavors, FlavorTable map) {
-        Map formatMap = new HashMap(flavors.length);
-        Map textPlainMap = new HashMap(flavors.length);
+    public SortedMap <Long, DataFlavor> getFormatsForFlavors(
+        DataFlavor[] flavors, FlavorTable map)
+    {
+        Map <Long,DataFlavor> formatMap =
+            new HashMap <> (flavors.length);
+        Map <Long,DataFlavor> textPlainMap =
+            new HashMap <> (flavors.length);
         // Maps formats to indices that will be used to sort the formats
         // according to the preference order.
         // Larger index value corresponds to the more preferable format.