Author: fschumacher
Date: Tue Dec 27 16:54:59 2016
New Revision: 1776174
URL: http://svn.apache.org/viewvc?rev=1776174&view=rev
Log:
Use StandardCharsets...name() instead of a simple string.
Modified:
jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java
Modified:
jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java
URL:
http://svn.apache.org/viewvc/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java?rev=1776174&r1=1776173&r2=1776174&view=diff
==============================================================================
---
jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java
(original)
+++
jmeter/trunk/test/src/org/apache/jmeter/protocol/http/modifier/TestAnchorModifier.java
Tue Dec 27 16:54:59 2016
@@ -26,6 +26,7 @@ import java.io.File;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
+import java.nio.charset.StandardCharsets;
import org.apache.jmeter.junit.JMeterTestCase;
import org.apache.jmeter.protocol.http.sampler.HTTPNullSampler;
@@ -315,7 +316,7 @@ public class TestAnchorModifier extends
@Test
public void testSpecialCharParse() throws Exception {
String specialChars = "-_.!~*'()%25";// These are some of the special
characters
- String htmlEncodedFixture = URLEncoder.encode(specialChars, "UTF-8");
+ String htmlEncodedFixture = URLEncoder.encode(specialChars,
StandardCharsets.UTF_8.name());
HTTPSamplerBase config = makeUrlConfig(".*index.html");
config.addArgument("test", ".*");