cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chipchild...@apache.org
Subject [1/2] git commit: updated refs/heads/4.1 to b20e29c
Date Fri, 12 Apr 2013 13:02:43 GMT
Updated Branches:
  refs/heads/4.1 2cfc2c8bb -> b20e29cff


CLOUDSTACK-1934: NPE with listSupportedNetworkServices

For 'connectivity' network service current set of providers (MidoNet,
NiciraNcp) not necessarily part of OSS builds. So handle the case where
there are no providers for a service


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/641594aa
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/641594aa
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/641594aa

Branch: refs/heads/4.1
Commit: 641594aa2ff6fb6d1a4208e71a1cf1bcd1d18f09
Parents: 2cfc2c8
Author: Murali Reddy <murali.reddy@citrix.com>
Authored: Fri Apr 12 16:44:03 2013 +0530
Committer: Chip Childers <chip.childers@gmail.com>
Committed: Fri Apr 12 14:02:23 2013 +0100

----------------------------------------------------------------------
 server/src/com/cloud/network/NetworkModelImpl.java |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/641594aa/server/src/com/cloud/network/NetworkModelImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/NetworkModelImpl.java b/server/src/com/cloud/network/NetworkModelImpl.java
index a9031b1..d39214a 100644
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -1009,7 +1009,10 @@ public class NetworkModelImpl extends ManagerBase implements NetworkModel
{
         Set<Provider> supportedProviders = new HashSet<Provider>();
     
         if (service != null) {
-            supportedProviders.addAll(s_serviceToImplementedProvidersMap.get(service));
+            List<Provider> providers = s_serviceToImplementedProvidersMap.get(service);
+            if (providers != null && !providers.isEmpty()) {
+                supportedProviders.addAll(providers);
+            }
         } else {
             for (List<Provider> pList : s_serviceToImplementedProvidersMap.values())
{
                 supportedProviders.addAll(pList);


Mime
View raw message