cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [10/21] git commit: updated refs/heads/ui-vm-affinity to 6629eb7
Date Fri, 12 Apr 2013 17:37:56 GMT
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/c0419791
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/c0419791
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/c0419791

Branch: refs/heads/ui-vm-affinity
Commit: c0419791ede331fff7151a5cee9a358c0400c272
Parents: 4ae3e5d
Author: Murali Reddy <murali.reddy@citrix.com>
Authored: Fri Apr 12 16:44:03 2013 +0530
Committer: Murali Reddy <murali.reddy@citrix.com>
Committed: Fri Apr 12 16:47:50 2013 +0530

----------------------------------------------------------------------
 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/c0419791/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 b82f90c..c5930d9 100755
--- a/server/src/com/cloud/network/NetworkModelImpl.java
+++ b/server/src/com/cloud/network/NetworkModelImpl.java
@@ -1013,7 +1013,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