You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2019/11/14 14:53:24 UTC

[GitHub] [accumulo] keith-turner commented on a change in pull request #1425: Fix #1419 use StandardCharsets in more places

keith-turner commented on a change in pull request #1425: Fix #1419 use StandardCharsets in more places
URL: https://github.com/apache/accumulo/pull/1425#discussion_r346357342
 
 

 ##########
 File path: server/tserver/src/test/java/org/apache/accumulo/tserver/MemValueTest.java
 ##########
 @@ -16,18 +16,17 @@
  */
 package org.apache.accumulo.tserver;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.junit.Assert.assertEquals;
 
-import java.nio.charset.Charset;
-
 import org.apache.accumulo.core.data.Value;
 import org.junit.Test;
 
 public class MemValueTest {
 
   @Test
   public void testDecodeDoesntModifyInputValue() {
-    Value v = new Value("2.0".getBytes(Charset.forName("UTF-8")));
+    Value v = new Value("2.0".getBytes(UTF_8));
 
 Review comment:
   I think the change you suggested is find because :
    * The test does not keep a ref to the byte array for later comparison
    * The Value constructor that take a char seq will do the same thing
    * The char seq constructor for Value was not added until 1.8, so this is probably code that was written before then

----------------------------------------------------------------
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


With regards,
Apache Git Services