From 96d6aaa2933d2b37f2859323822de5e61310e4c4 Mon Sep 17 00:00:00 2001 From: Rafael da Fonseca Date: Sun, 14 Jun 2015 15:25:33 +0200 Subject: [PATCH] Fix findbugs ClassCastException in UpgradeSystemVMCmd.java getDetails() isn't called anywhere in the code, either way, implementation is wrong since details is a Map and not a Map> If this piece of could would get run, it would just fail trying to cast String to HashMap in line 83 Signed-off-by: Rohit Yadav --- .../command/admin/systemvm/UpgradeSystemVMCmd.java | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java index f087077bc16..409b9b22810 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java @@ -75,18 +75,7 @@ public class UpgradeSystemVMCmd extends BaseCmd { } public Map getDetails() { - Map customparameterMap = new HashMap(); - if (details != null && details.size() != 0) { - Collection parameterCollection = details.values(); - Iterator iter = parameterCollection.iterator(); - while (iter.hasNext()) { - HashMap value = (HashMap)iter.next(); - for (Map.Entryentry : value.entrySet()) { - customparameterMap.put(entry.getKey(), entry.getValue()); - } - } - } - return customparameterMap; + return details; } /////////////////////////////////////////////////////