Author: sebb
Date: Fri Dec 10 17:06:56 2010
New Revision: 1044441
URL: http://svn.apache.org/viewvc?rev=1044441&view=rev
Log:
Unnecessary new String()
Modified:
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
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/PostWriterTest.java
URL:
http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java?rev=1044441&r1=1044440&r2=1044441&view=diff
==============================================================================
---
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
(original)
+++
jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java
Fri Dec 10 17:06:56 2010
@@ -533,7 +533,7 @@ public class PostWriterTest extends Test
postWriter.sendPostData(connection, sampler);
checkContentTypeUrlEncoded(connection);
- expectedUrl = new String("title=" + titleValue.replaceAll("%20", "+")
+ "&description=" + descriptionValue).getBytes("US-ASCII");
+ expectedUrl = ("title=" + titleValue.replaceAll("%20", "+") +
"&description=" + descriptionValue).getBytes("US-ASCII");
checkContentLength(connection, expectedUrl.length);
checkArraysHaveSameContent(expectedUrl,
connection.getOutputStreamContent());
assertEquals(
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=1044441&r1=1044440&r2=1044441&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
Fri Dec 10 17:06:56 2010
@@ -79,7 +79,7 @@ public class TestHTTPSamplersAgainstHttp
protected void setUp() throws Exception {
httpServer =
TestHTTPMirrorThread.startHttpMirror(MIRROR_PORT);
// Create the test file content
- TEST_FILE_CONTENT = new String("some foo content
&?=01234+56789-\u007c\u2aa1\u266a\u0153\u20a1\u0115\u0364\u00c5\u2052\uc385%C3%85").getBytes("UTF-8");
+ TEST_FILE_CONTENT = "some foo content
&?=01234+56789-\u007c\u2aa1\u266a\u0153\u20a1\u0115\u0364\u00c5\u2052\uc385%C3%85".getBytes("UTF-8");
// create a temporary file to make sure we always have a
file to give to the PostWriter
// Whereever we are or Whatever the current path is.
@@ -1179,7 +1179,7 @@ public class TestHTTPSamplersAgainstHttp
boolean firstMultipart,
boolean lastMultipart) throws IOException {
// The encoding used for http headers and control information
- final byte[] DASH_DASH = new String("--").getBytes(ISO_8859_1);
+ final byte[] DASH_DASH = "--".getBytes(ISO_8859_1);
final ByteArrayOutputStream output = new ByteArrayOutputStream();
if(firstMultipart) {
@@ -1256,7 +1256,7 @@ public class TestHTTPSamplersAgainstHttp
byte[] fileContent,
boolean firstMultipart,
boolean lastMultipart) throws IOException {
- final byte[] DASH_DASH = new String("--").getBytes(ISO_8859_1);
+ final byte[] DASH_DASH = "--".getBytes(ISO_8859_1);
final ByteArrayOutputStream output = new ByteArrayOutputStream();
if(firstMultipart) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]