You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jmeter.apache.org by se...@apache.org on 2016/01/14 23:13:16 UTC
svn commit: r1724702 -
/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
Author: sebb
Date: Thu Jan 14 22:13:16 2016
New Revision: 1724702
URL: http://svn.apache.org/viewvc?rev=1724702&view=rev
Log:
Fix a couple of simple deprecations
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
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=1724702&r1=1724701&r2=1724702&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 Thu Jan 14 22:13:16 2016
@@ -72,7 +72,7 @@ import org.apache.http.client.methods.Ht
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.params.ClientPNames;
import org.apache.http.client.params.CookiePolicy;
-import org.apache.http.client.protocol.ClientContext;
+import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.client.protocol.ResponseContentEncoding;
import org.apache.http.conn.ClientConnectionManager;
import org.apache.http.conn.ConnectionKeepAliveStrategy;
@@ -446,7 +446,7 @@ public class HTTPHC4Impl extends HTTPHCA
* @param localContext {@link HttpContext}
*/
private final void extractClientContextAfterSample(HttpContext localContext) {
- Object userToken = localContext.getAttribute(ClientContext.USER_TOKEN);
+ Object userToken = localContext.getAttribute(HttpClientContext.USER_TOKEN);
if(userToken != null) {
if(log.isDebugEnabled()) {
log.debug("Extracted from HttpContext user token:"+userToken+", storing it as JMeter variable:"+USER_TOKEN);
@@ -475,7 +475,7 @@ public class HTTPHC4Impl extends HTTPHCA
if(log.isDebugEnabled()) {
log.debug("Found user token:"+userToken+" as JMeter variable:"+USER_TOKEN+", storing it in HttpContext");
}
- localContext.setAttribute(ClientContext.USER_TOKEN, userToken);
+ localContext.setAttribute(HttpClientContext.USER_TOKEN, userToken);
} else {
// It would be better to create a ClientSessionManager that would compute this value
// for now it can be Thread.currentThread().getName() but must be changed when we would change
@@ -484,7 +484,7 @@ public class HTTPHC4Impl extends HTTPHCA
if(log.isDebugEnabled()) {
log.debug("Storing in HttpContext the user token:"+userId);
}
- localContext.setAttribute(ClientContext.USER_TOKEN, userId);
+ localContext.setAttribute(HttpClientContext.USER_TOKEN, userId);
}
}