accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [17/21] accumulo git commit: ACCUMULO-4131 Make more UTF_8 imports static
Date Wed, 03 Feb 2016 03:09:15 GMT
ACCUMULO-4131 Make more UTF_8 imports static


Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/a706b019
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/a706b019
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/a706b019

Branch: refs/heads/1.7
Commit: a706b019a9761c4cf8f1cf12ab260645460a0a58
Parents: 4af87bf
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Tue Feb 2 21:46:38 2016 -0500
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Tue Feb 2 21:46:38 2016 -0500

----------------------------------------------------------------------
 .../java/org/apache/accumulo/test/GenerateSequentialRFile.java  | 4 ++--
 .../accumulo/test/replication/merkle/cli/GenerateHashes.java    | 5 +++--
 test/src/test/java/org/apache/accumulo/test/ShellConfigIT.java  | 4 ++--
 3 files changed, 7 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/a706b019/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java b/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
index 30d19fe..64a1aaf 100644
--- a/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
+++ b/test/src/main/java/org/apache/accumulo/test/GenerateSequentialRFile.java
@@ -16,7 +16,7 @@
  */
 package org.apache.accumulo.test;
 
-import java.nio.charset.StandardCharsets;
+import static java.nio.charset.StandardCharsets.UTF_8;
 
 import org.apache.accumulo.core.cli.Help;
 import org.apache.accumulo.core.conf.DefaultConfiguration;
@@ -66,7 +66,7 @@ public class GenerateSequentialRFile implements Runnable {
         final Text row = new Text(String.format("%03d", x));
         for (int y = 0; y < opts.valuesPerRow; y++) {
           final String suffix = String.format("%05d", y);
-          writer.append(new Key(new Text(row + ":" + suffix), CF, CQ), new Value(suffix.getBytes(StandardCharsets.UTF_8)));
+          writer.append(new Key(new Text(row + ":" + suffix), CF, CQ), new Value(suffix.getBytes(UTF_8)));
         }
       }
 

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a706b019/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/GenerateHashes.java
----------------------------------------------------------------------
diff --git a/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/GenerateHashes.java
b/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/GenerateHashes.java
index 7e960b1..b1ef6c3 100644
--- a/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/GenerateHashes.java
+++ b/test/src/main/java/org/apache/accumulo/test/replication/merkle/cli/GenerateHashes.java
@@ -16,11 +16,12 @@
  */
 package org.apache.accumulo.test.replication.merkle.cli;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
+
 import java.io.ByteArrayOutputStream;
 import java.io.DataOutputStream;
 import java.io.File;
 import java.io.FileNotFoundException;
-import java.nio.charset.StandardCharsets;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
 import java.util.ArrayList;
@@ -131,7 +132,7 @@ public class GenerateHashes {
       ArrayList<Text> splits = new ArrayList<Text>();
 
       String line;
-      java.util.Scanner file = new java.util.Scanner(new File(splitsFile), StandardCharsets.UTF_8.name());
+      java.util.Scanner file = new java.util.Scanner(new File(splitsFile), UTF_8.name());
       try {
         while (file.hasNextLine()) {
           line = file.nextLine();

http://git-wip-us.apache.org/repos/asf/accumulo/blob/a706b019/test/src/test/java/org/apache/accumulo/test/ShellConfigIT.java
----------------------------------------------------------------------
diff --git a/test/src/test/java/org/apache/accumulo/test/ShellConfigIT.java b/test/src/test/java/org/apache/accumulo/test/ShellConfigIT.java
index 3903e3e..96f87f5 100644
--- a/test/src/test/java/org/apache/accumulo/test/ShellConfigIT.java
+++ b/test/src/test/java/org/apache/accumulo/test/ShellConfigIT.java
@@ -16,11 +16,11 @@
  */
 package org.apache.accumulo.test;
 
+import static java.nio.charset.StandardCharsets.UTF_8;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
 
 import java.io.File;
-import java.nio.charset.StandardCharsets;
 
 import org.apache.accumulo.core.client.Connector;
 import org.apache.accumulo.core.client.security.tokens.AuthenticationToken;
@@ -84,7 +84,7 @@ public class ShellConfigIT extends AccumuloClusterIT {
 
     TestShell ts = null;
     if (token instanceof PasswordToken) {
-      String passwd = new String(((PasswordToken) token).getPassword(), StandardCharsets.UTF_8);
+      String passwd = new String(((PasswordToken) token).getPassword(), UTF_8);
       ts = new TestShell(getAdminPrincipal(), passwd, getCluster().getInstanceName(), getCluster().getZooKeepers(),
clientConfFile);
     } else if (token instanceof KerberosToken) {
       ts = new TestShell(getAdminPrincipal(), null, getCluster().getInstanceName(), getCluster().getZooKeepers(),
clientConfFile);


Mime
View raw message