You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by GitBox <gi...@apache.org> on 2020/10/18 13:19:26 UTC

[GitHub] [jmeter] vlsi commented on a change in pull request #632: Add Error Prone code style verification

vlsi commented on a change in pull request #632:
URL: https://github.com/apache/jmeter/pull/632#discussion_r507146503



##########
File path: src/bshclient/src/main/java/org/apache/jmeter/util/BeanShellClient.java
##########
@@ -80,7 +82,7 @@ public static void main(String [] args) throws Exception{
     private static void sendLine( String line, OutputStream outPipe )
     throws IOException
     {
-        outPipe.write( line.getBytes() ); // TODO - charset?
+        outPipe.write(line.getBytes(StandardCharsets.UTF_8));

Review comment:
       I believe there's a movement to use UTF-8 by default.
   * https://openjdk.java.net/jeps/8187041
   * Kotlin uses UTF-8 by default
   
   Of course, we can make it configurable, however, I believe, most of the times UTF-8 by default would be better (less chances to corrupt data) than use platform-default encoding.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org