cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1522151 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
Date Thu, 12 Sep 2013 02:52:43 GMT
Author: ningjiang
Date: Thu Sep 12 02:52:43 2013
New Revision: 1522151

URL: http://svn.apache.org/r1522151
Log:
CXF-5272 fixed the NPE issue which caused camel-cxf endpoint cannot be started in Blueprint
with ClientPolicy is set

Modified:
    cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java?rev=1522151&r1=1522150&r2=1522151&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/blueprint/HTTPClientPolicyHolder.java
Thu Sep 12 02:52:43 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());



Mime
View raw message