Author: dkulp Date: Wed Mar 6 21:17:59 2013 New Revision: 1453566 URL: http://svn.apache.org/r1453566 Log: Merged revisions 1453562 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/branches/2.7.x-fixes
........ r1453562 | dkulp | 2013-03-06 16:11:52 -0500 (Wed, 06 Mar 2013) | 10 lines Merged revisions 1453541 via git cherry-pick from https://svn.apache.org/repos/asf/cxf/trunk ........ r1453541 | dkulp | 2013-03-06 15:42:52 -0500 (Wed, 06 Mar 2013) | 2 lines [CXF-4879] Check for empty strings for the Proxy properties. ........ ........ Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java Modified: cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java URL: http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java?rev=1453566&r1=1453565&r2=1453566&view=diff ============================================================================== --- cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java (original) +++ cxf/branches/2.6.x-fixes/rt/transports/http/src/main/java/org/apache/cxf/transport/http/ProxyFactory.java Wed Mar 6 21:17:59 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
