Fixes #729 Adds missing hashCode implementations Adds missing hashCode methods for classes which override equals.
Project: http://git-wip-us.apache.org/repos/asf/incubator-fluo/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-fluo/commit/c9f41e2e Tree: http://git-wip-us.apache.org/repos/asf/incubator-fluo/tree/c9f41e2e Diff: http://git-wip-us.apache.org/repos/asf/incubator-fluo/diff/c9f41e2e Branch: refs/heads/master Commit: c9f41e2ecb0b8b47d0d61487b409bb7f3e1e8c4e Parents: 5ed9f2d Author: Christopher Tubbs <ctubb...@apache.org> Authored: Tue Jul 26 14:40:13 2016 -0400 Committer: Christopher Tubbs <ctubb...@apache.org> Committed: Wed Jul 27 15:54:29 2016 -0400 ---------------------------------------------------------------------- .../test/java/org/apache/fluo/accumulo/iterators/TestData.java | 6 ++++++ modules/api/src/main/java/org/apache/fluo/api/data/Span.java | 5 +++++ 2 files changed, 11 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/c9f41e2e/modules/accumulo/src/test/java/org/apache/fluo/accumulo/iterators/TestData.java ---------------------------------------------------------------------- diff --git a/modules/accumulo/src/test/java/org/apache/fluo/accumulo/iterators/TestData.java b/modules/accumulo/src/test/java/org/apache/fluo/accumulo/iterators/TestData.java index ae809c8..99b2b41 100644 --- a/modules/accumulo/src/test/java/org/apache/fluo/accumulo/iterators/TestData.java +++ b/modules/accumulo/src/test/java/org/apache/fluo/accumulo/iterators/TestData.java @@ -18,6 +18,7 @@ package org.apache.fluo.accumulo.iterators; import java.io.IOException; import java.util.HashSet; import java.util.Map.Entry; +import java.util.Objects; import java.util.Set; import java.util.TreeMap; @@ -158,4 +159,9 @@ public class TestData { sb.append("}"); return sb.toString(); } + + @Override + public int hashCode() { + return Objects.hashCode(data); + } } http://git-wip-us.apache.org/repos/asf/incubator-fluo/blob/c9f41e2e/modules/api/src/main/java/org/apache/fluo/api/data/Span.java ---------------------------------------------------------------------- diff --git a/modules/api/src/main/java/org/apache/fluo/api/data/Span.java b/modules/api/src/main/java/org/apache/fluo/api/data/Span.java index 61f3178..6ac084b 100644 --- a/modules/api/src/main/java/org/apache/fluo/api/data/Span.java +++ b/modules/api/src/main/java/org/apache/fluo/api/data/Span.java @@ -194,6 +194,11 @@ public class Span implements Serializable { + ((endInclusive && !end.equals(RowColumn.EMPTY)) ? "]" : ")"); } + @Override + public int hashCode() { + return Objects.hash(start, end, startInclusive, endInclusive); + } + /** * Creates a span that covers an exact row */