Author: ningjiang
Date: Thu Sep 12 03:23:32 2013
New Revision: 1522194

URL: http://svn.apache.org/r1522194
Log:
Merged revisions 1522151 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/trunk

........
  r1522151 | ningjiang | 2013-09-12 10:52:43 +0800 (Thu, 12 Sep 2013) | 1 line
  
  CXF-5272 fixed the NPE issue which caused camel-cxf endpoint cannot be 
started in Blueprint with ClientPolicy is set
........

Modified:
    cxf/branches/2.7.x-fixes/   (props changed)
    
cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/trunk:r1522151

Propchange: cxf/branches/2.7.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: 
cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
URL: 
http://svn.apache.org/viewvc/cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java?rev=1522194&r1=1522193&r2=1522194&view=diff
==============================================================================
--- 
cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
 (original)
+++ 
cxf/branches/2.7.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
 Thu Sep 12 03:23:32 2013
@@ -70,7 +70,10 @@ public class HTTPClientPolicyHolder exte
             this.setMaxRetransmits(clientPolicy.getMaxRetransmits());
             this.setNonProxyHosts(clientPolicy.getNonProxyHosts());
             this.setProxyServer(clientPolicy.getProxyServer());
-            this.setProxyServerPort(clientPolicy.getProxyServerPort());
+            // need to check if the property is set to avoid NPE
+            if (clientPolicy.isSetProxyServerPort()) {
+                this.setProxyServerPort(clientPolicy.getProxyServerPort());
+            }
             this.setProxyServerType(clientPolicy.getProxyServerType());
             this.setReceiveTimeout(clientPolicy.getReceiveTimeout());
             this.setReferer(clientPolicy.getReferer());


Reply via email to