cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [3/6] cxf git commit: Properties passed into the ExtensionManagerBus at creation time aren't actually used.
Date Tue, 07 Apr 2015 20:47:18 GMT
Properties passed into the ExtensionManagerBus at creation time aren't actually used.


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/c4921f95
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/c4921f95
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/c4921f95

Branch: refs/heads/master
Commit: c4921f953e4639f17d4f8dbff42b91c8fae0ffcb
Parents: 5bac01e
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Apr 7 15:02:34 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Tue Apr 7 16:30:25 2015 -0400

----------------------------------------------------------------------
 .../org/apache/cxf/bus/extension/ExtensionManagerBus.java     | 7 +++----
 .../main/java/org/apache/cxf/resource/PropertiesResolver.java | 3 +++
 2 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c4921f95/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 909ed8a..fe80e42 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
@@ -20,7 +20,6 @@ package org.apache.cxf.bus.extension;
 
 import java.io.InputStream;
 import java.util.Collection;
-import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 import java.util.concurrent.ConcurrentHashMap;
@@ -96,7 +95,7 @@ public class ExtensionManagerBus extends AbstractBasicInterceptorProvider
implem
     
     private final ExtensionManagerImpl extensionManager;
     
-    public ExtensionManagerBus(Map<Class<?>, Object> extensions, Map<String,
Object> properties,
+    public ExtensionManagerBus(Map<Class<?>, Object> extensions, Map<String,
Object> props,
           ClassLoader extensionClassLoader) {
         if (extensions == null) {
             extensions = new ConcurrentHashMap<Class<?>, Object>(16, 0.75f, 4);
@@ -115,8 +114,8 @@ public class ExtensionManagerBus extends AbstractBasicInterceptorProvider
implem
             feature.setPrettyLogging(FORCE_PRETTY);
             features.add(feature);
         }        
-        if (null == properties) {
-            properties = new HashMap<String, Object>();
+        if (null != props) {
+            properties.putAll(props);
         }
         
         Configurer configurer = (Configurer)extensions.get(Configurer.class);

http://git-wip-us.apache.org/repos/asf/cxf/blob/c4921f95/core/src/main/java/org/apache/cxf/resource/PropertiesResolver.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/resource/PropertiesResolver.java b/core/src/main/java/org/apache/cxf/resource/PropertiesResolver.java
index 4809b81..b2d2419 100644
--- a/core/src/main/java/org/apache/cxf/resource/PropertiesResolver.java
+++ b/core/src/main/java/org/apache/cxf/resource/PropertiesResolver.java
@@ -35,6 +35,9 @@ public class PropertiesResolver implements ResourceResolver {
     }
 
     public <T> T resolve(String resourceName, Class<T> resourceType) {
+        if (resourceName == null) {
+            return null;
+        }
         Object obj = properties.get(resourceName);
         if (null != obj) {
             return resourceType.cast(properties.get(resourceName));


Mime
View raw message