You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ah...@apache.org on 2013/01/09 14:26:47 UTC
[46/50] [abbrv] git commit: CLOUDSTACK-932: Fix incorrect param that
caused casting error while processing api Reported-by: Kishan Kavala
Signed-off-by: Rohit Yadav
CLOUDSTACK-932: Fix incorrect param that caused casting error while processing api
Reported-by: Kishan Kavala <ki...@citrix.com>
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/0b0752f0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/0b0752f0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/0b0752f0
Branch: refs/heads/javelin
Commit: 0b0752f047c112cfd2de7ba3347887f593890368
Parents: fc92f04
Author: Rohit Yadav <bh...@apache.org>
Authored: Wed Jan 9 04:47:53 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Wed Jan 9 04:47:53 2013 -0800
----------------------------------------------------------------------
server/src/com/cloud/api/ApiDispatcher.java | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/0b0752f0/server/src/com/cloud/api/ApiDispatcher.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDispatcher.java b/server/src/com/cloud/api/ApiDispatcher.java
index 75e3617..7bc3271 100755
--- a/server/src/com/cloud/api/ApiDispatcher.java
+++ b/server/src/com/cloud/api/ApiDispatcher.java
@@ -430,10 +430,9 @@ public class ApiDispatcher {
switch (listType) {
case LONG:
case UUID:
- List<Long> listParam = new ArrayList<Long>();
- listParam = (List) field.get(cmd);
+ List<Long> listParam = (List<Long>) field.get(cmd);
for (Long entityId : listParam) {
- Object entityObj = s_instance._entityMgr.findById(entity, (Long) field.get(cmd));
+ Object entityObj = s_instance._entityMgr.findById(entity, entityId);
entitiesToAccess.add(entityObj);
}
break;