src/solaris/classes/sun/awt/XSettings.java

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

@@ -50,11 +50,11 @@
      * @param data settings data obtained from
      *     <code>_XSETTINGS_SETTINGS</code> window property of the
      *     settings manager.
      * @return a <code>Map</code> of changed settings.
      */
-    public Map update(byte[] data) {
+    public Map<String, Object> update(byte[] data) {
         return (new Update(data)).update();
     }
 
 
     /**

@@ -77,11 +77,11 @@
         private boolean isLittle;
         private long serial = -1;
         private int nsettings = 0;
         private boolean isValid;
 
-        private HashMap updatedSettings;
+        private HashMap<String, Object> updatedSettings;
 
 
         /**
          * Construct an Update object for the data read from
          * <code>_XSETTINGS_SETTINGS</code> property of the XSETTINGS

@@ -111,11 +111,11 @@
             // N_SETTINGS cannot realistically exceed 2^31 (so we
             // gonna use int anyway), just read it as INT32.
             idx = 8;
             nsettings = getINT32();
 
-            updatedSettings = new HashMap();
+            updatedSettings = new HashMap<>();
 
             isValid = true;
         }
 
 

@@ -211,11 +211,11 @@
 
 
         /**
          * Update settings.
          */
-        public Map update() {
+        public Map<String, Object> update() {
             if (!isValid) {
                 return null;
             }
 
             synchronized (XSettings.this) {