This is an automated email from the ASF dual-hosted git repository. ctubbsii pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/fluo.git
The following commit(s) were added to refs/heads/main by this push: new 7131326 Unnecessary assignments are removed. (#1107) 7131326 is described below commit 7131326081113feae38fe226f9f0c6c4c50cb69c Author: Furkan KAMACI <furkankam...@gmail.com> AuthorDate: Fri Oct 16 23:46:07 2020 +0300 Unnecessary assignments are removed. (#1107) --- .../main/java/org/apache/fluo/accumulo/format/FluoFormatter.java | 2 +- .../test/java/org/apache/fluo/core/impl/VisibilityCacheTest.java | 1 - .../src/main/java/org/apache/fluo/integration/TestUtil.java | 8 ++------ 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java b/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java index e202816..96da40d 100644 --- a/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java +++ b/modules/accumulo/src/main/java/org/apache/fluo/accumulo/format/FluoFormatter.java @@ -88,7 +88,7 @@ public class FluoFormatter { return sb.toString(); } else { long ts = key.getTimestamp(); - String type = ""; + String type; ColumnType colType = ColumnType.from(ts); switch (colType) { diff --git a/modules/core/src/test/java/org/apache/fluo/core/impl/VisibilityCacheTest.java b/modules/core/src/test/java/org/apache/fluo/core/impl/VisibilityCacheTest.java index 1e207f2..6f9f672 100644 --- a/modules/core/src/test/java/org/apache/fluo/core/impl/VisibilityCacheTest.java +++ b/modules/core/src/test/java/org/apache/fluo/core/impl/VisibilityCacheTest.java @@ -28,6 +28,5 @@ public class VisibilityCacheTest { public void testVisibilityCacheConstructor() { VisibilityCache cache = new VisibilityCache(new FluoConfiguration()); Assert.assertNotNull("VisibilityCache failed to instantiate.", cache); - cache = null; } } diff --git a/modules/integration-tests/src/main/java/org/apache/fluo/integration/TestUtil.java b/modules/integration-tests/src/main/java/org/apache/fluo/integration/TestUtil.java index 61ce45e..af3d23f 100644 --- a/modules/integration-tests/src/main/java/org/apache/fluo/integration/TestUtil.java +++ b/modules/integration-tests/src/main/java/org/apache/fluo/integration/TestUtil.java @@ -27,17 +27,13 @@ public class TestUtil { private static final Bytes ZERO = Bytes.of("0"); public static void increment(TransactionBase tx, Bytes row, Column col, int val) { - int prev = 0; String prevStr = tx.get(row, col, ZERO).toString(); - prev = Integer.parseInt(prevStr); - tx.set(row, col, Bytes.of(prev + val + "")); + tx.set(row, col, Bytes.of(Integer.toString(Integer.parseInt(prevStr) + val))); } public static void increment(TransactionBase tx, String row, Column col, int val) { - int prev = 0; String prevStr = tx.gets(row, col, "0"); - prev = Integer.parseInt(prevStr); - tx.set(row, col, prev + val + ""); + tx.set(row, col, Integer.toString(Integer.parseInt(prevStr) + val)); } public static int getOrDefault(SnapshotBase snap, String row, Column col, int defaultVal) {