mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
Fix findbugs ClassCastException in UpgradeSystemVMCmd.java getDetails() isn't called anywhere in the code, either way, implementation is wrong since details is a Map<String, String> and not a Map<String, Map<String,String>> If this piece of could would get run, it would just fail trying to cast String to HashMap<String,String> in line 83
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
8634fe5cf5
commit
96d6aaa293
@ -75,18 +75,7 @@ public class UpgradeSystemVMCmd extends BaseCmd {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Map<String, String> getDetails() {
|
public Map<String, String> getDetails() {
|
||||||
Map<String, String> customparameterMap = new HashMap<String, String>();
|
return details;
|
||||||
if (details != null && details.size() != 0) {
|
|
||||||
Collection parameterCollection = details.values();
|
|
||||||
Iterator iter = parameterCollection.iterator();
|
|
||||||
while (iter.hasNext()) {
|
|
||||||
HashMap<String, String> value = (HashMap<String, String>)iter.next();
|
|
||||||
for (Map.Entry<String,String>entry : value.entrySet()) {
|
|
||||||
customparameterMap.put(entry.getKey(), entry.getValue());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return customparameterMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user