jmeter-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [jmeter] vlsi commented on a change in pull request #632: Add Error Prone code style verification
Date Sun, 18 Oct 2020 13:19:46 GMT

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: https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.io/java.io.-file/read-text.html
   
   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



Mime
View raw message