Skip to content

Commit a596f2c

Browse files
author
Robert Lazarski
committed
AXIS-2295 Apply community suggested fixes to http proxy parameters caching mechanism
1 parent 026d7fe commit a596f2c

2 files changed

Lines changed: 16 additions & 26 deletions

File tree

axis-rt-core/src/main/java/org/apache/axis/components/net/DefaultHTTPTransportClientProperties.java

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -37,59 +37,49 @@ public class DefaultHTTPTransportClientProperties
3737
* @see org.apache.axis.components.net.TransportClientProperties#getProxyHost()
3838
*/
3939
public String getProxyHost() {
40-
if (proxyHost == null) {
41-
proxyHost = AxisProperties.getProperty("http.proxyHost");
42-
if (proxyHost == null)
43-
proxyHost = emptyString;
44-
}
40+
proxyHost = AxisProperties.getProperty("http.proxyHost");
41+
if (proxyHost == null)
42+
proxyHost = emptyString;
4543
return proxyHost;
4644
}
4745

4846
/**
4947
* @see org.apache.axis.components.net.TransportClientProperties#getNonProxyHosts()
5048
*/
5149
public String getNonProxyHosts() {
52-
if (nonProxyHosts == null) {
53-
nonProxyHosts = AxisProperties.getProperty("http.nonProxyHosts");
54-
if (nonProxyHosts == null)
55-
nonProxyHosts = emptyString;
56-
}
50+
nonProxyHosts = AxisProperties.getProperty("http.nonProxyHosts");
51+
if (nonProxyHosts == null)
52+
nonProxyHosts = emptyString;
5753
return nonProxyHosts;
5854
}
5955

6056
/**
6157
* @see org.apache.axis.components.net.TransportClientProperties#getProxyPort()
6258
*/
6359
public String getProxyPort() {
64-
if (proxyPort == null) {
65-
proxyPort = AxisProperties.getProperty("http.proxyPort");
66-
if (proxyPort == null)
67-
proxyPort = emptyString;
68-
}
60+
proxyPort = AxisProperties.getProperty("http.proxyPort");
61+
if (proxyPort == null)
62+
proxyPort = emptyString;
6963
return proxyPort;
7064
}
7165

7266
/**
7367
* @see org.apache.axis.components.net.TransportClientProperties#getProxyUser()
7468
*/
7569
public String getProxyUser() {
76-
if (proxyUser == null) {
77-
proxyUser = AxisProperties.getProperty("http.proxyUser");
78-
if (proxyUser == null)
79-
proxyUser = emptyString;
80-
}
70+
proxyUser = AxisProperties.getProperty("http.proxyUser");
71+
if (proxyUser == null)
72+
proxyUser = emptyString;
8173
return proxyUser;
8274
}
8375

8476
/**
8577
* @see org.apache.axis.components.net.TransportClientProperties#getProxyPassword()
8678
*/
8779
public String getProxyPassword() {
88-
if (proxyPassword == null) {
89-
proxyPassword = AxisProperties.getProperty("http.proxyPassword");
90-
if (proxyPassword == null)
91-
proxyPassword = emptyString;
92-
}
80+
proxyPassword = AxisProperties.getProperty("http.proxyPassword");
81+
if (proxyPassword == null)
82+
proxyPassword = emptyString;
9383
return proxyPassword;
9484
}
9585
}

axis-rt-core/src/main/java/org/apache/axis/components/net/TransportClientPropertiesFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
*/
2828
public class TransportClientPropertiesFactory {
2929
protected static Log log =
30-
LogFactory.getLog(SocketFactoryFactory.class.getName());
30+
LogFactory.getLog(TransportClientPropertiesFactory.class.getName());
3131

3232
private static HashMap cache = new HashMap();
3333
private static HashMap defaults = new HashMap();

0 commit comments

Comments
 (0)