You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2015/06/15 11:14:35 UTC

[02/34] git commit: updated refs/heads/master to 7a57ce3

Fix findbugs ClassCastException in ScaleSystemVMCmd.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 Map<String,String>

Signed-off-by: Rohit Yadav <ro...@shapeblue.com>


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

Branch: refs/heads/master
Commit: 31a4f0ad6b822741c916be5d646cd51bf9f92288
Parents: 85ad1b7
Author: Rafael da Fonseca <rs...@gmail.com>
Authored: Sun Jun 14 15:11:16 2015 +0200
Committer: Rohit Yadav <ro...@shapeblue.com>
Committed: Mon Jun 15 12:09:14 2015 +0300

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


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/31a4f0ad/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java
index c4b2e99..fa608cc 100644
--- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java
+++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java
@@ -80,18 +80,7 @@ public class ScaleSystemVMCmd extends BaseAsyncCmd {
     }
 
     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;
     }
 
     /////////////////////////////////////////////////////