You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by dk...@apache.org on 2016/01/11 17:49:35 UTC
[27/30] incubator-tinkerpop git commit: fixed a bug in ObjectWritable
comparable that showed up with Giraph. If the objects are not comparable and
you say they are equal,
then equals() is not used for comparison. Weak. I simple -1 for non-comparable
obje
fixed a bug in ObjectWritable comparable that showed up with Giraph. If the objects are not comparable and you say they are equal, then equals() is not used for comparison. Weak. I simple -1 for non-comparable objects solves the problem.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/4ad66170
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/4ad66170
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/4ad66170
Branch: refs/heads/TINKERPOP-320
Commit: 4ad66170a792b2768cf95d18271bb5ccd62fee2d
Parents: d7b295b
Author: Marko A. Rodriguez <ok...@gmail.com>
Authored: Mon Jan 11 09:31:00 2016 -0700
Committer: Marko A. Rodriguez <ok...@gmail.com>
Committed: Mon Jan 11 09:31:00 2016 -0700
----------------------------------------------------------------------
.../tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/4ad66170/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java
----------------------------------------------------------------------
diff --git a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java
index a4cde0e..765b6d5 100644
--- a/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java
+++ b/hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/structure/io/ObjectWritable.java
@@ -97,7 +97,7 @@ public final class ObjectWritable<T> implements WritableComparable<ObjectWritabl
@Override
public int compareTo(final ObjectWritable objectWritable) {
- return this.t instanceof Comparable ? ((Comparable) this.t).compareTo(objectWritable.get()) : 0;
+ return this.t instanceof Comparable ? ((Comparable) this.t).compareTo(objectWritable.get()) : -1;
}
public boolean isEmpty() {