Author: pmouawad
Date: Fri Feb 19 23:21:03 2016
New Revision: 1731311
URL: http://svn.apache.org/viewvc?rev=1731311&view=rev
Log:
Bug 59038 - Deprecate HTTPClient 3.1 related elements
Bugzilla Id: 59038
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java?rev=1731311&r1=1731310&r2=1731311&view=diff
==============================================================================
---
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
(original)
+++
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
Fri Feb 19 23:21:03 2016
@@ -146,7 +146,9 @@ public class CacheManager extends Config
* result to decide if result is cacheable
* @throws URIException
* if extraction of the the uri from <code>method</code> fails
+ * @deprecated HC3.1 will be dropped in upcoming version
*/
+ @Deprecated
public void saveDetails(HttpMethod method, HTTPSampleResult res) throws
URIException{
if (isCacheable(res) && !hasVaryHeader(method)){
String lastModified = getHeader(method
,HTTPConstants.LAST_MODIFIED);
@@ -159,6 +161,10 @@ public class CacheManager extends Config
}
}
+ /**
+ * @deprecated
+ */
+ @Deprecated
private boolean hasVaryHeader(HttpMethod method) {
return getHeader(method, HTTPConstants.VARY) != null;
}
@@ -262,7 +268,14 @@ public class CacheManager extends Config
getCache().put(url, new CacheEntry(lastModified, expiresDate, etag));
}
- // Helper method to deal with missing headers - Commons HttpClient
+ /**
+ * Helper method to deal with missing headers - Commons HttpClient
+ * @param method Http method
+ * @param name Header name
+ * @return Header value
+ * @deprecated HC3.1 will be dropped in upcoming version
+ */
+ @Deprecated
private String getHeader(HttpMethod method, String name){
org.apache.commons.httpclient.Header hdr =
method.getResponseHeader(name);
return hdr != null ? hdr.getValue() : null;
@@ -304,7 +317,9 @@ public class CacheManager extends Config
* Commons HttpClient version
* @param url URL to look up in cache
* @param method where to set the headers
+ * @deprecated HC3.1 will be dropped in upcoming version
*/
+ @Deprecated
public void setHeaders(URL url, HttpMethod method) {
CacheEntry entry = getCache().get(url.toString());
if (log.isDebugEnabled()){