You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2012/10/25 01:01:07 UTC
git commit: fix default templateadaptor is not injected
Updated Branches:
refs/heads/master 48c2e6b84 -> 6a7215ced
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/master
Commit: 6a7215cedcf96f1b7186157814219e086c58fcf4
Parents: 48c2e6b
Author: Edison Su <ed...@citrix.com>
Authored: Wed Oct 24 16:00:51 2012 -0700
Committer: Edison Su <ed...@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())) {