camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-10708: Fixed potential NPE when setting username/password
Date Tue, 17 Jan 2017 09:07:51 GMT
Repository: camel
Updated Branches:
  refs/heads/master 1562121d4 -> 4093fe50a


CAMEL-10708: Fixed potential NPE when setting username/password


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

Branch: refs/heads/master
Commit: 4093fe50ad947be352a7450bb8bda14f168973ee
Parents: 1562121
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Jan 17 10:05:21 2017 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Jan 17 10:07:44 2017 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/cxf/CxfEndpoint.java   | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4093fe50/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
index d495bda..b21bfbe 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
@@ -509,8 +509,6 @@ public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint,
Heade
         if (getServiceName() != null) {
             factoryBean.setServiceName(getServiceName());
         }
-        
-        
 
         // port name qname
         if (getPortName() != null) {
@@ -560,6 +558,9 @@ public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint,
Heade
             AuthorizationPolicy authPolicy = new AuthorizationPolicy();
             authPolicy.setUserName(username);
             authPolicy.setPassword(password);
+            if (factoryBean.getProperties() == null) {
+                factoryBean.setProperties(new HashMap<String, Object>());
+            }
             factoryBean.getProperties().put(AuthorizationPolicy.class.getName(), authPolicy);
         }
         


Mime
View raw message