< prev index next >

src/share/classes/javax/swing/plaf/metal/MetalRadioButtonUI.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>

@@ -171,19 +171,19 @@
                     // Use selected icon
                     altIcon = b.getSelectedIcon();
                 }
             } else if(model.isSelected()) {
                 if(b.isRolloverEnabled() && model.isRollover()) {
-                        altIcon = (Icon) b.getRolloverSelectedIcon();
+                        altIcon = b.getRolloverSelectedIcon();
                         if (altIcon == null) {
-                                altIcon = (Icon) b.getSelectedIcon();
+                                altIcon = b.getSelectedIcon();
                         }
                 } else {
-                        altIcon = (Icon) b.getSelectedIcon();
+                        altIcon = b.getSelectedIcon();
                 }
             } else if(b.isRolloverEnabled() && model.isRollover()) {
-                altIcon = (Icon) b.getRolloverIcon();
+                altIcon = b.getRolloverIcon();
             }
 
             if(altIcon == null) {
                 altIcon = b.getIcon();
             }
< prev index next >