< prev index next >

src/com/sun/javatest/exec/BasicCustomTestFilter.java

Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg

@@ -99,11 +99,11 @@
         super(name, e);
         this.uif = uif;
         init(null);
     }
 
-    BasicCustomTestFilter(Map map, ExecModel e, UIFactory uif) {
+    BasicCustomTestFilter(Map<String, String> map, ExecModel e, UIFactory uif) {
         super(map, e);
         this.uif = uif;
         init(map);
     }
 

@@ -147,11 +147,11 @@
             obs[i].filterUpdated(filter);
         }
     }
 
     @Override
-    boolean load(Map map) {
+    boolean load(Map<String, String> map) {
         boolean result = super.load(map);
         activeSettings = new SettingsSnapshot(map);
         putSettings(activeSettings);
         activateSettings(activeSettings);
 

@@ -272,11 +272,11 @@
     public String getDescription() {
         return DESCRIPTION;
     }
 
     // ----- PRIVATE -----
-    private void init(Map map) {
+    private void init(Map<String, String> map) {
         if (NAME == null) {
             NAME = uif.getI18NString("basicTf.name");
         }
 
         if (REASON == null) {

@@ -881,11 +881,11 @@
 
     // keyword info
     private ButtonGroup keyBtnGrp;
     private JRadioButton keyAllBtn;
     private JRadioButton keyMatchBtn;
-    private JComboBox keywordsChoice;
+    private JComboBox<String> keywordsChoice;
     private JTextField keywordsField;
     private static final String ALL_OF = "allOf";
     private static final String ANY_OF = "anyOf";
     private static final String EXPR = "expr";
 

@@ -905,11 +905,11 @@
     private JCheckBox jtxCheckBox;
     private JCheckBox tsfCheckBox;
 
     // jtx info fields
     private JTextField jtxMode;
-    private JList jtxFileList;
+    private JList<?> jtxFileList;
     private DefaultListModel<String> jtxFiles;
     private static String NAME,  REASON,  DESCRIPTION;
 
     /**
      * Necessary to track changes which occur in the active interview.

@@ -994,11 +994,11 @@
             urlsEnabled = true;
             keyChoice = EXPR;
             keyString = "";
         }
 
-        SettingsSnapshot(Map m) {
+        SettingsSnapshot(Map<String, String> m) {
             this();
             load(m);
         }
 
         public boolean equals(Object settings) {

@@ -1066,25 +1066,25 @@
 
             map.put(MAP_KEY_CHOICE, keyChoice);
             map.put(MAP_KEY_STRING, keyString);
         }
 
-        void load(Map map) {
-            urlsEnabled = intToBoolean((String) (map.get(MAP_URL_ENABLE)));
-            keywordsEnabled = intToBoolean((String) (map.get(MAP_KEY_ENABLE)));
-            statusEnabled = intToBoolean((String) (map.get(MAP_STATUS_ENABLE)));
-            jtxEnabled = intToBoolean((String) (map.get(MAP_JTX_ENABLE)));
-            tsfEnabled = intToBoolean((String) (map.get(MAP_TSF_ENABLE)));
+        void load(Map<String, String> map) {
+            urlsEnabled = intToBoolean((map.get(MAP_URL_ENABLE)));
+            keywordsEnabled = intToBoolean((map.get(MAP_KEY_ENABLE)));
+            statusEnabled = intToBoolean((map.get(MAP_STATUS_ENABLE)));
+            jtxEnabled = intToBoolean((map.get(MAP_JTX_ENABLE)));
+            tsfEnabled = intToBoolean((map.get(MAP_TSF_ENABLE)));
 
             for (int i = 0; i < Status.NUM_STATES; i++) {
-                statusFields[i] = intToBoolean((String) (map.get(MAP_STATUS_PREFIX + i)));
+                statusFields[i] = intToBoolean((map.get(MAP_STATUS_PREFIX + i)));
             }   // for
 
-            initialUrls = StringArray.split((String) (map.get(MAP_URLS)));
+            initialUrls = StringArray.split((map.get(MAP_URLS)));
 
-            keyChoice = (String) (map.get(MAP_KEY_CHOICE));
-            keyString = (String) (map.get(MAP_KEY_STRING));
+            keyChoice = map.get(MAP_KEY_CHOICE);
+            keyString = map.get(MAP_KEY_STRING);
 
             validate();
         }
 
         private void validate() {
< prev index next >