This commit is contained in:
boccioli_m
2017-08-31 17:04:05 +02:00
parent 2c4e0cce1a
commit 432d89ed8e
2 changed files with 9 additions and 14 deletions

View File

@@ -2486,7 +2486,7 @@ public class TestingList extends Panel {
private HashMap getParameters(String sTestPath, String sDevicePath) {
HashMap deviceParams = buildParametersMap(getConfigItem("parameters", sDevicePath));
HashMap testParams = buildParametersMap(getConfigItem("parameters", sTestPath));
HashMap params;
HashMap params = new HashMap();
if(deviceParams.isEmpty()){
return testParams;
}
@@ -2495,23 +2495,18 @@ public class TestingList extends Panel {
while (itD.hasNext()) {
Map.Entry pairD = (Map.Entry)itD.next();
System.out.println(pairD.getKey() + " = " + pairD.getValue());
Iterator itT = testParams.entrySet().iterator();
while (itT.hasNext()) {
Map.Entry pairT = (Map.Entry)itT.next();
if(pairT.getKey().toString().equals(pairD.getKey().toString())){
System.out.println("test: " + pairT.getKey() + " = " + pairT.getValue());
System.out.println("device: " + pairD.getKey() + " = " + pairD.getValue());
}
}
//it.remove(); // avoids a ConcurrentModificationException
}
params.putIfAbsent(pairD.getKey(), pairD.getValue());
}
Iterator it = testParams.entrySet().iterator();
System.out.println("testParams: " + testParams.size());
while (it.hasNext()) {
Map.Entry pair = (Map.Entry)it.next();
System.out.println(pair.getKey() + " = " + pair.getValue());
//it.remove(); // avoids a ConcurrentModificationException
}
// add parameter only if not already on device parameters
params.putIfAbsent(pair.getKey(), pair.getValue());
}
return testParams;
}