diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java index b2d77b85dd2..e902e650332 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java @@ -70,13 +70,12 @@ public class FindHostsForMigrationCmd extends BaseListCmd { public void execute() { ListResponse response = null; Pair,Integer> result; - List hostsWithCapacity = new ArrayList(); Map hostsRequiringStorageMotion; Ternary,Integer>, List, Map> hostsForMigration = _mgr.listHostsForMigrationOfVM(getVirtualMachineId(), this.getStartIndex(), this.getPageSizeVal()); result = hostsForMigration.first(); - hostsWithCapacity = hostsForMigration.second(); + List hostsWithCapacity = hostsForMigration.second(); hostsRequiringStorageMotion = hostsForMigration.third(); response = new ListResponse(); diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java index eaaec3091a7..1e378fae464 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java @@ -171,11 +171,10 @@ public class ListHostsCmd extends BaseListCmd { response = _queryService.searchForServers(this); } else { Pair,Integer> result; - List hostsWithCapacity = new ArrayList(); Ternary,Integer>, List, Map> hostsForMigration = _mgr.listHostsForMigrationOfVM(getVirtualMachineId(), this.getStartIndex(), this.getPageSizeVal()); result = hostsForMigration.first(); - hostsWithCapacity = hostsForMigration.second(); + List hostsWithCapacity = hostsForMigration.second(); response = new ListResponse(); List hostResponses = new ArrayList(); diff --git a/api/src/org/apache/cloudstack/api/command/admin/region/ListPortableIpRangesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/region/ListPortableIpRangesCmd.java index 75bcce00acf..1f77c2c5164 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/region/ListPortableIpRangesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/region/ListPortableIpRangesCmd.java @@ -81,9 +81,8 @@ public class ListPortableIpRangesCmd extends BaseListCmd { public void execute(){ ListResponse response = new ListResponse(); List responses = new ArrayList(); - List portableIpRanges = new ArrayList(); - portableIpRanges = _configService.listPortableIpRanges(this); + List portableIpRanges = _configService.listPortableIpRanges(this); if (portableIpRanges != null && !portableIpRanges.isEmpty()) { for (PortableIpRange range : portableIpRanges) { PortableIpRangeResponse rangeResponse = _responseGenerator.createPortableIPRangeResponse(range); diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java index 3219601156e..9e6abec74e2 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java @@ -153,8 +153,7 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd { List templateResponses = new ArrayList(); for (Pair iso : isoZonePairSet) { - List responses = new ArrayList(); - responses = _responseGenerator.createIsoResponses(iso.first(), iso.second(), listInReadyState()); + List responses = _responseGenerator.createIsoResponses(iso.first(), iso.second(), listInReadyState()); templateResponses.addAll(responses); } response.setResponses(templateResponses); diff --git a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java index aeb76f507f3..dc94d676661 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java @@ -125,8 +125,7 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd { List templateResponses = new ArrayList(); for (Pair template : templateZonePairSet) { - List responses = new ArrayList(); - responses = _responseGenerator.createTemplateResponses(template.first().longValue(), template.second(), listInReadyState()); + List responses = _responseGenerator.createTemplateResponses(template.first().longValue(), template.second(), listInReadyState()); templateResponses.addAll(responses); }