CID-1192822: ids is a List<Long>, the cast to List<?> is removed
Signed-off-by: Rohit Yadav <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/92858afd Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/92858afd Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/92858afd Branch: refs/heads/master Commit: 92858afd55a2a19cf698bbbf34c891fbf8087e9d Parents: 2401eb9 Author: Rohit Yadav <[email protected]> Authored: Thu Sep 25 16:59:47 2014 +0200 Committer: Rohit Yadav <[email protected]> Committed: Thu Sep 25 16:59:47 2014 +0200 ---------------------------------------------------------------------- server/src/com/cloud/api/query/QueryManagerImpl.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/92858afd/server/src/com/cloud/api/query/QueryManagerImpl.java ---------------------------------------------------------------------- diff --git a/server/src/com/cloud/api/query/QueryManagerImpl.java b/server/src/com/cloud/api/query/QueryManagerImpl.java index 4f775fc..475b42c 100644 --- a/server/src/com/cloud/api/query/QueryManagerImpl.java +++ b/server/src/com/cloud/api/query/QueryManagerImpl.java @@ -912,11 +912,8 @@ public class QueryManagerImpl extends ManagerBase implements QueryService { sc.setParameters("display", display); } - if (ids != null) { - List<?> idList = (ids instanceof List<?> ? (List<?>)ids : null); - if (idList != null && !idList.isEmpty()) { - sc.setParameters("idIN", idList.toArray()); - } + if (ids != null && !ids.isEmpty()) { + sc.setParameters("idIN", ids.toArray()); } if (templateId != null) {
