< prev index next >

src/share/classes/javax/swing/plaf/synth/SynthStyle.java

Print this page
rev 1580 : 6727661: Code improvement and warnings removing from the swing/plaf packages
Summary: Removed unnecessary castings and other warnings
Reviewed-by: alexp
Contributed-by: Florian Brunner <fbrunnerlist@gmx.ch>

@@ -52,11 +52,11 @@
  */
 public abstract class SynthStyle {
     /**
      * Contains the default values for certain properties.
      */
-    private static Map DEFAULT_VALUES;
+    private static Map<Object, Object> DEFAULT_VALUES;
 
     /**
      * Shared SynthGraphics.
      */
     private static final SynthGraphicsUtils SYNTH_GRAPHICS =

@@ -714,11 +714,11 @@
      * is no default for the specified value.
      */
     private static Object getDefaultValue(Object key) {
         synchronized(SynthStyle.class) {
             if (DEFAULT_VALUES == null) {
-                DEFAULT_VALUES = new HashMap();
+                DEFAULT_VALUES = new HashMap<Object, Object>();
                 populateDefaultValues();
             }
             Object value = DEFAULT_VALUES.get(key);
             if (value instanceof UIDefaults.LazyValue) {
                 value = ((UIDefaults.LazyValue)value).createValue(null);
< prev index next >