< prev index next >
src/com/sun/javatest/lib/KeywordScript.java
Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg
@@ -62,18 +62,18 @@
return;
} // else
} // for
String prefix = "script.";
- Set testKeys = td.getKeywordTable();
+ Set<String> testKeys = td.getKeywordTable();
Vector<String> choices = new Vector<>(); // the set of choices
Vector<String> matches = new Vector<>(); // the set of matches
int wordsMatchingInMatches = 0;// the number of words matching
findMatch:
- for (Iterator iter = env.keys().iterator(); iter.hasNext(); ) {
- String key = (String) (iter.next());
+ for (Iterator<String> iter = env.keys().iterator(); iter.hasNext(); ) {
+ String key = (iter.next());
// if the key does not begin with the `script.' prefix, ignore key
if (!key.startsWith(prefix))
continue;
@@ -175,11 +175,11 @@
"this script has now been selected: " + " " +
StringArray.join(command) };
printStrArr(trOut, msgs);
try {
- Class c = Class.forName(command[0]);
+ Class<?> c = Class.forName(command[0]);
Script script = (Script)c.newInstance();
String[] scriptArgs = new String[command.length - 1];
System.arraycopy(command, 1, scriptArgs, 0, scriptArgs.length);
initDelegate(script, scriptArgs);
< prev index next >