Author: ningjiang
Date: Thu Sep 12 03:30:57 2013
New Revision: 1522213

URL: http://svn.apache.org/r1522213
Log:
Merged revisions 1522194 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes

................
  r1522194 | ningjiang | 2013-09-12 11:23:32 +0800 (Thu, 12 Sep 2013) | 9 lines
  
  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.6.x-fixes/   (props changed)
    
cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java

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

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

Modified: 
cxf/branches/2.6.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.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java?rev=1522213&r1=1522212&r2=1522213&view=diff
==============================================================================
--- 
cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
 (original)
+++ 
cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
 Thu Sep 12 03:30:57 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