jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1855696 - /jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
Date Sun, 17 Mar 2019 13:13:50 GMT
Author: fschumacher
Date: Sun Mar 17 13:13:49 2019
New Revision: 1855696

URL: http://svn.apache.org/viewvc?rev=1855696&view=rev
Log:
Use StandardCharset instead of simple string value for ASCII

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/JMeter.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/JMeter.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/JMeter.java?rev=1855696&r1=1855695&r2=1855696&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/JMeter.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/JMeter.java Sun Mar 17 13:13:49 2019
@@ -1443,7 +1443,7 @@ public class JMeter implements JMeterPlu
                 InetAddress address = request.getAddress();
                 // Only accept commands from the local host
                 if (address.isLoopbackAddress()){
-                    String command = new String(request.getData(), request.getOffset(), request.getLength(),"ASCII");
+                    String command = new String(request.getData(), request.getOffset(), request.getLength(),
StandardCharsets.US_ASCII);
                     System.out.println("Command: "+command+" received from "+address);//NOSONAR
                     log.info("Command: {} received from {}", command, address);
                     switch(command) {



Mime
View raw message