cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject [5/8] cxf git commit: Properties passed into the ExtensionManagerBus at creation time aren't actually used.
Date Mon, 13 Apr 2015 19:29:34 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/99b9510a
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/99b9510a
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/99b9510a

Branch: refs/heads/3.0.x-fixes
Commit: 99b9510aac932561873690a16a306490c636def8
Parents: 4cb275f
Author: Daniel Kulp <dkulp@apache.org>
Authored: Tue Apr 7 15:02:34 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Mon Apr 13 15:28:12 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/99b9510a/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/99b9510a/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