From 0b0752f047c112cfd2de7ba3347887f593890368 Mon Sep 17 00:00:00 2001 From: Rohit Yadav Date: Wed, 9 Jan 2013 04:47:53 -0800 Subject: [PATCH] CLOUDSTACK-932: Fix incorrect param that caused casting error while processing api Reported-by: Kishan Kavala Signed-off-by: Rohit Yadav --- server/src/com/cloud/api/ApiDispatcher.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/src/com/cloud/api/ApiDispatcher.java b/server/src/com/cloud/api/ApiDispatcher.java index 75e361720fe..7bc3271523b 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 listParam = new ArrayList(); - listParam = (List) field.get(cmd); + List listParam = (List) 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;