Repository: cxf Updated Branches: refs/heads/3.0.x-fixes 900c5f46b -> 38962dab9
The extensions are "put" into a Map using the same key, thus there is no point in putting all of them in. Just grab the first one. Project: http://git-wip-us.apache.org/repos/asf/cxf/repo Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/38962dab Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/38962dab Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/38962dab Branch: refs/heads/3.0.x-fixes Commit: 38962dab94efd1cfafd562dec34819719367a81a Parents: 900c5f4 Author: Daniel Kulp <[email protected]> Authored: Wed Nov 12 14:08:40 2014 -0500 Committer: Daniel Kulp <[email protected]> Committed: Wed Nov 12 14:11:33 2014 -0500 ---------------------------------------------------------------------- .../java/org/apache/cxf/bus/extension/ExtensionManagerBus.java | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/cxf/blob/38962dab/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java ---------------------------------------------------------------------- diff --git a/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java b/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java index bb5f1b9..0478279 100644 --- a/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java +++ b/core/src/main/java/org/apache/cxf/bus/extension/ExtensionManagerBus.java @@ -208,10 +208,8 @@ public class ExtensionManagerBus extends AbstractBasicInterceptorProvider implem } else { //force loading Collection<?> objs = loc.getBeansOfType(extensionType); - if (objs != null) { - for (Object o : objs) { - extensions.put(extensionType, o); - } + if (objs != null && objs.size() != 0) { + extensions.put(extensionType, objs.iterator().next()); } obj = extensions.get(extensionType); }
