incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From t..@apache.org
Subject [28/49] git commit: fix default templateadaptor is not injected
Date Sat, 27 Oct 2012 10:02:26 GMT
fix default templateadaptor is not injected


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

Branch: refs/heads/marvin-parallel
Commit: 6a7215cedcf96f1b7186157814219e086c58fcf4
Parents: 48c2e6b
Author: Edison Su <edison.su@citrix.com>
Authored: Wed Oct 24 16:00:51 2012 -0700
Committer: Edison Su <edison.su@citrix.com>
Committed: Wed Oct 24 16:00:57 2012 -0700

----------------------------------------------------------------------
 .../cloud/utils/component/ComponentLocator.java    |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/6a7215ce/utils/src/com/cloud/utils/component/ComponentLocator.java
----------------------------------------------------------------------
diff --git a/utils/src/com/cloud/utils/component/ComponentLocator.java b/utils/src/com/cloud/utils/component/ComponentLocator.java
index 2f76f15..25b5ac1 100755
--- a/utils/src/com/cloud/utils/component/ComponentLocator.java
+++ b/utils/src/com/cloud/utils/component/ComponentLocator.java
@@ -202,7 +202,16 @@ public class ComponentLocator implements ComponentLocatorMBean {
                 _managerMap.putAll(library.getManagers());
                 _factories.putAll(library.getFactories());
                 _pluginsMap.putAll(library.getPluggableServices());
-
+                
+                 for (Entry<String, List<ComponentInfo<Adapter>>> e : library.getAdapters().entrySet())
{
+                	 if (adapters.containsKey(e.getKey())) {
+                 		s_logger.debug("Merge needed for " + e.getKey());
+                 		adapters.get(e.getKey()).addAll(e.getValue());
+                 	}
+                 	else {
+                 		adapters.put(e.getKey(), e.getValue());
+                 	}
+                 }
                 // putAll overwrites existing keys, so merge instead
                 for (Entry<String, List<ComponentInfo<Adapter>>> e : handler.adapters.entrySet())
{
                 	if (adapters.containsKey(e.getKey())) {


Mime
View raw message