Repository: cxf Updated Branches: refs/heads/master e31cf1c5d -> 0158b0194
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/0158b019 Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/0158b019 Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/0158b019 Branch: refs/heads/master Commit: 0158b0194d9e5711bf3c3275f2d568accca62280 Parents: e31cf1c 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:01 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/0158b019/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); }
