cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhais...@apache.org
Subject [04/34] git commit: updated refs/heads/master to 7a57ce3
Date Mon, 15 Jun 2015 09:14:37 GMT
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>


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/96d6aaa2
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/96d6aaa2
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/96d6aaa2

Branch: refs/heads/master
Commit: 96d6aaa2933d2b37f2859323822de5e61310e4c4
Parents: 8634fe5
Author: Rafael da Fonseca <rsafonseca@gmail.com>
Authored: Sun Jun 14 15:25:33 2015 +0200
Committer: Rohit Yadav <rohit.yadav@shapeblue.com>
Committed: Mon Jun 15 12:09:16 2015 +0300

----------------------------------------------------------------------
 .../api/command/admin/systemvm/UpgradeSystemVMCmd.java | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/96d6aaa2/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java
----------------------------------------------------------------------
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 f087077..409b9b2 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<String, String> getDetails() {
-        Map<String, String> customparameterMap = new HashMap<String, String>();
-        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;
+        return details;
     }
 
     /////////////////////////////////////////////////////


Mime
View raw message