accumulo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ctubb...@apache.org
Subject [3/8] accumulo git commit: ACCUMULO-3938 Remove incorrect getCanonicalName() usage
Date Sat, 18 Jul 2015 00:07:58 GMT
ACCUMULO-3938 Remove incorrect getCanonicalName() usage


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

Branch: refs/heads/1.6
Commit: 967100ddad5cfc0a525b951e3730b3270c20ef54
Parents: 68dd750
Author: Christopher Tubbs <ctubbsii@apache.org>
Authored: Fri Jul 17 19:33:39 2015 -0400
Committer: Christopher Tubbs <ctubbsii@apache.org>
Committed: Fri Jul 17 19:33:39 2015 -0400

----------------------------------------------------------------------
 .../accumulo/core/client/mapreduce/RangeInputSplit.java   |  2 +-
 .../core/client/mapreduce/AccumuloInputFormatTest.java    |  6 +++---
 .../apache/accumulo/core/util/shell/ShellConfigTest.java  | 10 +++++-----
 3 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/accumulo/blob/967100dd/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
index 803f835..874aaa8 100644
--- a/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
+++ b/core/src/main/java/org/apache/accumulo/core/client/mapreduce/RangeInputSplit.java
@@ -301,7 +301,7 @@ public class RangeInputSplit extends InputSplit implements Writable {
       if (null != token && null != tokenFile) {
         throw new IOException("Cannot use both inline AuthenticationToken and file-based
AuthenticationToken");
       } else if (null != token) {
-        out.writeUTF(token.getClass().getCanonicalName());
+        out.writeUTF(token.getClass().getName());
         out.writeUTF(Base64.encodeBase64String(AuthenticationTokenSerializer.serialize(token)));
       } else {
         out.writeUTF(tokenFile);

http://git-wip-us.apache.org/repos/asf/accumulo/blob/967100dd/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
index ed4965d..1801b37 100644
--- a/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/client/mapreduce/AccumuloInputFormatTest.java
@@ -295,7 +295,7 @@ public class AccumuloInputFormatTest {
     }
     bw.close();
 
-    Assert.assertEquals(0, MRTester.main(new String[] {"root", "", TEST_TABLE_1, INSTANCE_NAME,
AccumuloInputFormat.class.getCanonicalName()}));
+    Assert.assertEquals(0, MRTester.main(new String[] {"root", "", TEST_TABLE_1, INSTANCE_NAME,
AccumuloInputFormat.class.getName()}));
     assertNull(e1);
     assertNull(e2);
   }
@@ -367,7 +367,7 @@ public class AccumuloInputFormatTest {
     Assert.assertEquals(
         0,
         MRTester.main(new String[] {user, "", "testtable", "testPartialInputSplitDelegationToConfiguration",
-            EmptySplitsAccumuloInputFormat.class.getCanonicalName()}));
+            EmptySplitsAccumuloInputFormat.class.getName()}));
     assertNull(e1);
     assertNull(e2);
   }
@@ -392,7 +392,7 @@ public class AccumuloInputFormatTest {
     Assert.assertEquals(
         1,
         MRTester.main(new String[] {user, "", "testtable", "testPartialFailedInputSplitDelegationToConfiguration",
-            BadPasswordSplitsAccumuloInputFormat.class.getCanonicalName()}));
+            BadPasswordSplitsAccumuloInputFormat.class.getName()}));
     assertNull(e1);
     assertNull(e2);
   }

http://git-wip-us.apache.org/repos/asf/accumulo/blob/967100dd/core/src/test/java/org/apache/accumulo/core/util/shell/ShellConfigTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/accumulo/core/util/shell/ShellConfigTest.java b/core/src/test/java/org/apache/accumulo/core/util/shell/ShellConfigTest.java
index c61b6f0..c4c6667 100644
--- a/core/src/test/java/org/apache/accumulo/core/util/shell/ShellConfigTest.java
+++ b/core/src/test/java/org/apache/accumulo/core/util/shell/ShellConfigTest.java
@@ -80,19 +80,19 @@ public class ShellConfigTest {
 
   @Test
   public void testTokenWithoutOptions() {
-    assertFalse(shell.config("--fake", "-tc", PasswordToken.class.getCanonicalName()));
-    assertFalse(output.get().contains(ParameterException.class.getCanonicalName()));
+    assertFalse(shell.config("--fake", "-tc", PasswordToken.class.getName()));
+    assertFalse(output.get().contains(ParameterException.class.getName()));
   }
 
   @Test
   public void testTokenAndOption() {
-    assertTrue(shell.config("--fake", "-tc", PasswordToken.class.getCanonicalName(), "-u",
"foo", "-l", "password=foo"));
+    assertTrue(shell.config("--fake", "-tc", PasswordToken.class.getName(), "-u", "foo",
"-l", "password=foo"));
   }
 
   @Test
   public void testTokenAndOptionAndPassword() {
-    assertFalse(shell.config("--fake", "-tc", PasswordToken.class.getCanonicalName(), "-l",
"password=foo", "-p", "bar"));
-    assertTrue(output.get().contains(ParameterException.class.getCanonicalName()));
+    assertFalse(shell.config("--fake", "-tc", PasswordToken.class.getName(), "-l", "password=foo",
"-p", "bar"));
+    assertTrue(output.get().contains(ParameterException.class.getName()));
   }
 
   @Test


Mime
View raw message