cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject svn commit: r1453541 - /cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
Date Wed, 06 Mar 2013 20:42:53 GMT
Author: dkulp
Date: Wed Mar  6 20:42:52 2013
New Revision: 1453541

URL: http://svn.apache.org/r1453541
Log:
[CXF-4879] Check for empty strings for the Proxy properties.

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

Modified: cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
URL: http://svn.apache.org/viewvc/cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java?rev=1453541&r1=1453540&r2=1453541&view=diff
==============================================================================
--- cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
(original)
+++ cxf/trunk/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java
Wed Mar  6 20:42:52 2013
@@ -63,6 +63,9 @@ public class ProxyFactory {
         // Retrieve system properties (if any)
         HTTPClientPolicy systemProxyConfiguration = null;
         String proxyHost = SystemPropertyAction.getPropertyOrNull(HTTP_PROXY_HOST);
+        if (StringUtils.isEmpty(proxyHost)) {
+            proxyHost = null;
+        }
         if (proxyHost != null) {
             // System is configured with a proxy, use it
 
@@ -72,6 +75,10 @@ public class ProxyFactory {
 
             // 8080 is the default proxy port value as per some documentation
             String proxyPort = SystemPropertyAction.getProperty(HTTP_PROXY_PORT, "8080");
+            if (StringUtils.isEmpty(proxyPort)) {
+                proxyPort = null;
+            }
+            
             systemProxyConfiguration.setProxyServerPort(Integer.valueOf(proxyPort));
 
             // Load non proxy hosts



Mime
View raw message