CLOUDSTACK-932: Fix incorrect param that caused casting error while processing api Reported-by: Kishan Kavala <[email protected]> Signed-off-by: Rohit Yadav <[email protected]>
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 <[email protected]> Authored: Wed Jan 9 04:47:53 2013 -0800 Committer: Rohit Yadav <[email protected]> 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;
