Author: pmouawad
Date: Sat Dec 31 16:04:14 2016
New Revision: 1776792
URL: http://svn.apache.org/viewvc?rev=1776792&view=rev
Log:
Sonar : fix squid:S00115 "Rename this constant name to match the regular
expression '^[A-Z][A-Z0-9]*(_[A-Z0-9]+)*$'"
Mention breaking change in changes.xml
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
jmeter/trunk/xdocs/changes.xml
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java?rev=1776792&r1=1776791&r2=1776792&view=diff
==============================================================================
---
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
(original)
+++
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
Sat Dec 31 16:04:14 2016
@@ -100,7 +100,7 @@ public class HTTPHC3Impl extends HTTPHCA
private static final String HTTP_AUTHENTICATION_PREEMPTIVE =
"http.authentication.preemptive"; // $NON-NLS-1$
- private static final boolean canSetPreEmptive; // OK to set pre-emptive
auth?
+ private static final boolean CAN_SET_PREEMPTIVE; // OK to set pre-emptive
auth?
private static final ThreadLocal<Map<HostConfiguration, HttpClient>>
httpClients =
new ThreadLocal<Map<HostConfiguration, HttpClient>>(){
@@ -144,7 +144,7 @@ public class HTTPHC3Impl extends HTTPHCA
// If the pre-emptive parameter is undefined, then we can set it as
needed
// otherwise we should do what the user requested.
- canSetPreEmptive =
params.getParameter(HTTP_AUTHENTICATION_PREEMPTIVE) == null;
+ CAN_SET_PREEMPTIVE =
params.getParameter(HTTP_AUTHENTICATION_PREEMPTIVE) == null;
// Handle old-style JMeter properties
try {
@@ -493,7 +493,7 @@ public class HTTPHC3Impl extends HTTPHCA
if (user.length() > 0){
httpClient.getState().setProxyCredentials(
new
AuthScope(proxyHost,proxyPort,null,AuthScope.ANY_SCHEME),
- new
NTCredentials(user,getProxyPass(),localHost,PROXY_DOMAIN)
+ new
NTCredentials(user,getProxyPass(),LOCALHOST,PROXY_DOMAIN)
);
} else {
httpClient.getState().clearProxyCredentials();
@@ -503,7 +503,7 @@ public class HTTPHC3Impl extends HTTPHCA
if (PROXY_USER.length() > 0){
httpClient.getState().setProxyCredentials(
new
AuthScope(PROXY_HOST,PROXY_PORT,null,AuthScope.ANY_SCHEME),
- new
NTCredentials(PROXY_USER,PROXY_PASS,localHost,PROXY_DOMAIN)
+ new
NTCredentials(PROXY_USER,PROXY_PASS,LOCALHOST,PROXY_DOMAIN)
);
}
} else {
@@ -699,17 +699,17 @@ public class HTTPHC3Impl extends HTTPHCA
new NTCredentials(
username,
auth.getPass(),
- localHost,
+ LOCALHOST,
domain
));
// We have credentials - should we set pre-emptive
authentication?
- if (canSetPreEmptive){
+ if (CAN_SET_PREEMPTIVE){
log.debug("Setting Pre-emptive authentication");
params.setAuthenticationPreemptive(true);
}
} else {
state.clearCredentials();
- if (canSetPreEmptive){
+ if (CAN_SET_PREEMPTIVE){
params.setAuthenticationPreemptive(false);
}
}
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java?rev=1776792&r1=1776791&r2=1776792&view=diff
==============================================================================
---
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
(original)
+++
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Sat Dec 31 16:04:14 2016
@@ -848,7 +848,7 @@ public class HTTPHC4Impl extends HTTPHCA
if (proxyUser.length() > 0) {
((AbstractHttpClient)
httpClient).getCredentialsProvider().setCredentials(
new AuthScope(proxyHost, proxyPort),
- new NTCredentials(proxyUser, proxyPass, localHost,
PROXY_DOMAIN));
+ new NTCredentials(proxyUser, proxyPass, LOCALHOST,
PROXY_DOMAIN));
}
}
@@ -1132,7 +1132,7 @@ public class HTTPHC4Impl extends HTTPHCA
((AbstractHttpClient) client).getCredentialsProvider();
if (authManager != null) {
if(authManager.hasAuthForURL(url)) {
- authManager.setupCredentials(client, url, credentialsProvider,
localHost);
+ authManager.setupCredentials(client, url, credentialsProvider,
LOCALHOST);
} else {
credentialsProvider.clear();
}
Modified: jmeter/trunk/xdocs/changes.xml
URL:
http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1776792&r1=1776791&r2=1776792&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml [utf-8] (original)
+++ jmeter/trunk/xdocs/changes.xml [utf-8] Sat Dec 31 16:04:14 2016
@@ -84,6 +84,8 @@ Fill in some detail.
<ul>
<li>JMeter requires now at least a JAVA 8 version to run.</li>
<li>Process Sampler now returns error code 500 when an error occurs. It
previously returned an empty value.</li>
+ <li>In
<code>org.apache.jmeter.protocol.http.sampler.HTTPHCAbstractImpl</code> 2
protected static fields (localhost and nonProxyHostSuffixSize) have been
renamed to (LOCALHOST and NON_PROXY_HOST_SUFFIX_SIZE)
+ to follow static fields naming convention</li>
</ul>
<h3>Deprecated and removed elements or functions</h3>