CLOUDSTACK-932: Fix incorrect param that caused casting error while processing api

Reported-by: Kishan Kavala <kishan.kavala@citrix.com>
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Rohit Yadav 2013-01-09 04:47:53 -08:00
parent fc92f04c6b
commit 0b0752f047
1 changed files with 2 additions and 3 deletions

View File

@ -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;