CLOUDSTACK-2530: fix npe if no network isolation methods Signed-off-by: Mice Xia <mice_...@tcloudcomputing.com>
Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/973c43a1 Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/973c43a1 Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/973c43a1 Branch: refs/heads/vmware-datamodel Commit: 973c43a152d39b85f53428b00f451fba9cb82003 Parents: 3ed9e42 Author: Dave Brosius <dbros...@mebigfatguy.com> Authored: Thu May 16 07:16:12 2013 -0500 Committer: Mice Xia <mice_...@tcloudcomputing.com> Committed: Fri May 17 10:08:07 2013 +0800 ---------------------------------------------------------------------- .../network/ListNetworkIsolationMethodsCmd.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cloudstack/blob/973c43a1/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java ---------------------------------------------------------------------- diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java index 7eef22a..0d23fd6 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkIsolationMethodsCmd.java @@ -44,7 +44,7 @@ public class ListNetworkIsolationMethodsCmd extends BaseListCmd{ isolationResponses.add(isolationMethod); } } - response.setResponses(isolationResponses, methods.length); + response.setResponses(isolationResponses, isolationResponses.size()); response.setResponseName(getCommandName()); this.setResponseObject(response);