You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jmeter-dev@jakarta.apache.org by se...@apache.org on 2010/02/02 00:16:37 UTC
svn commit: r905447 -
/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
Author: sebb
Date: Mon Feb 1 23:16:37 2010
New Revision: 905447
URL: http://svn.apache.org/viewvc?rev=905447&view=rev
Log:
Stop using deprecated methods
Modified:
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java
URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java?rev=905447&r1=905446&r2=905447&view=diff
==============================================================================
--- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java (original)
+++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java Mon Feb 1 23:16:37 2010
@@ -34,6 +34,7 @@
import org.apache.jmeter.protocol.http.control.TestHTTPMirrorThread;
import org.apache.jmeter.protocol.http.util.EncoderCache;
import org.apache.jmeter.protocol.http.util.HTTPArgument;
+import org.apache.jmeter.protocol.http.util.HTTPFileArg;
import org.apache.jmeter.testelement.TestPlan;
import org.apache.jmeter.threads.JMeterContextService;
import org.apache.jmeter.threads.JMeterVariables;
@@ -1091,7 +1092,6 @@
*
* @param httpSampler
*/
- @SuppressWarnings("deprecation")
private void setupFileUploadData(
HTTPSamplerBase httpSampler,
boolean isEncoded,
@@ -1105,9 +1105,9 @@
// Set the form data
setupFormData(httpSampler, isEncoded, titleField, titleValue, descriptionField, descriptionValue);
// Set the file upload data
- httpSampler.setFileField(fileField);
- httpSampler.setFilename(fileValue.getAbsolutePath());
- httpSampler.setMimetype(fileMimeType);
+ HTTPFileArg[] hfa = {new HTTPFileArg(fileValue == null ? "" : fileValue.getAbsolutePath(), fileField, fileMimeType)};
+ httpSampler.setHTTPFiles(hfa);
+
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-dev-help@jakarta.apache.org