< prev index next >
src/com/sun/javatest/audit/Audit.java
Print this page
rev 145 : 7902237: Fixing raw use of parameterized class
Reviewed-by: jjg
*** 129,143 ****
badTestDescriptionsV.addElement(tr);
if (!checkTestCases(tr, excludeList))
badTestCaseTestsV.addElement(tr);
! Map trEnv = tr.getEnvironment();
! for (Iterator i = trEnv.entrySet().iterator(); i.hasNext(); ) {
! Map.Entry e = (Map.Entry) (i.next());
! String key = (String) (e.getKey());
! String value = (String) (e.getValue());
Vector<String> allValuesForKey = envTable.get(key);
if (allValuesForKey == null) {
allValuesForKey = new Vector<>();
envTable.put(key, allValuesForKey);
}
--- 129,142 ----
badTestDescriptionsV.addElement(tr);
if (!checkTestCases(tr, excludeList))
badTestCaseTestsV.addElement(tr);
! Map<String, String> trEnv = tr.getEnvironment();
! for (Map.Entry<String, String> e : trEnv.entrySet() ) {
! String key = e.getKey();
! String value = e.getValue();
Vector<String> allValuesForKey = envTable.get(key);
if (allValuesForKey == null) {
allValuesForKey = new Vector<>();
envTable.put(key, allValuesForKey);
}
*** 165,177 ****
//System.err.println(td.getRootRelativeURL() + " " + TestResult.getWorkRelativePath(td) + " " + e);
badTestsV.addElement(td);
}
}
! for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) {
! String key = (String)(e.nextElement());
! Vector allValuesForKey = envTable.get(key);
envCounts[allValuesForKey.size() == 1 ? 0 : 1]++;
}
if (badChecksumTestsV.size() > 0) {
badChecksumTests = new TestResult[badChecksumTestsV.size()];
--- 164,176 ----
//System.err.println(td.getRootRelativeURL() + " " + TestResult.getWorkRelativePath(td) + " " + e);
badTestsV.addElement(td);
}
}
! for (Enumeration<String> e = envTable.keys(); e.hasMoreElements(); ) {
! String key = e.nextElement();
! Vector<String> allValuesForKey = envTable.get(key);
envCounts[allValuesForKey.size() == 1 ? 0 : 1]++;
}
if (badChecksumTestsV.size() > 0) {
badChecksumTests = new TestResult[badChecksumTestsV.size()];
*** 250,260 ****
* Get the composite set of environment values used by the tests.
* @return A table of values.
* The keys to the table are strings; the values are vectors of strings
* containing the various values for that key.
*/
! public Hashtable getEnvTable() {
return envTable;
}
/**
* Get the statistics about the test results.
--- 249,259 ----
* Get the composite set of environment values used by the tests.
* @return A table of values.
* The keys to the table are strings; the values are vectors of strings
* containing the various values for that key.
*/
! public Hashtable<String, Vector<String>> getEnvTable() {
return envTable;
}
/**
* Get the statistics about the test results.
*** 491,508 ****
private void showEnvValues(boolean showAll) {
out.println();
out.print(i18n.getString("adt.envList.title"));
SortedSet<String> ss = new TreeSet<>();
! for (Enumeration e = envTable.keys(); e.hasMoreElements(); ) {
! String key = (String)(e.nextElement());
ss.add(key);
}
! for (Iterator iter = ss.iterator(); iter.hasNext(); ) {
! String key = (String) (iter.next());
! Vector allValuesForKey = envTable.get(key);
if (allValuesForKey.size() == 1) {
if (showAll)
out.println(i18n.getString("adt.envKeyValue",
new Object[] {key, allValuesForKey.elementAt(0)}));
}
--- 490,507 ----
private void showEnvValues(boolean showAll) {
out.println();
out.print(i18n.getString("adt.envList.title"));
SortedSet<String> ss = new TreeSet<>();
! for (Enumeration<String> e = envTable.keys(); e.hasMoreElements(); ) {
! String key = (e.nextElement());
ss.add(key);
}
! for (Iterator<String> iter = ss.iterator(); iter.hasNext(); ) {
! String key = (iter.next());
! Vector<String> allValuesForKey = envTable.get(key);
if (allValuesForKey.size() == 1) {
if (showAll)
out.println(i18n.getString("adt.envKeyValue",
new Object[] {key, allValuesForKey.elementAt(0)}));
}
*** 631,645 ****
return (a == b);
//if (!a.rootRelativeFile.equals(b.rootRelativeFile))
// return false;
! Iterator eA = a.getParameterKeys();
! Iterator eB = b.getParameterKeys();
while (eA.hasNext() && eB.hasNext()) {
! String keyA = (String)eA.next();
! String keyB = (String)eB.next();
if (!keyA.equals(keyB)) {
//System.err.println("mismatch " + a.getRootRelativePath() + " a:" + keyA + " b:" + keyB);
return false;
}
--- 630,644 ----
return (a == b);
//if (!a.rootRelativeFile.equals(b.rootRelativeFile))
// return false;
! Iterator<String> eA = a.getParameterKeys();
! Iterator<String> eB = b.getParameterKeys();
while (eA.hasNext() && eB.hasNext()) {
! String keyA = eA.next();
! String keyB = eB.next();
if (!keyA.equals(keyB)) {
//System.err.println("mismatch " + a.getRootRelativePath() + " a:" + keyA + " b:" + keyB);
return false;
}
< prev index next >