tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ok...@apache.org
Subject 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 objects solv
Date Mon, 11 Jan 2016 16:31:05 GMT
Repository: incubator-tinkerpop
Updated Branches:
  refs/heads/master d7b295be6 -> 4ad66170a


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/master
Commit: 4ad66170a792b2768cf95d18271bb5ccd62fee2d
Parents: d7b295b
Author: Marko A. Rodriguez <okrammarko@gmail.com>
Authored: Mon Jan 11 09:31:00 2016 -0700
Committer: Marko A. Rodriguez <okrammarko@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() {


Mime
View raw message