tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rd...@apache.org
Subject [19/50] tinkerpop git commit: Minor code change for the ever so nitpicky @okram.
Date Sun, 03 Sep 2017 00:42:54 GMT
Minor code change for the ever so nitpicky @okram.


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/33e23923
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/33e23923
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/33e23923

Branch: refs/heads/TINKERPOP-1692
Commit: 33e23923badb159730aa8a1b835a215216d537e6
Parents: 9bb6661
Author: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Authored: Fri Aug 18 13:48:45 2017 -0700
Committer: Daniel Kuppitz <daniel_kuppitz@hotmail.com>
Committed: Fri Aug 25 12:27:55 2017 -0700

----------------------------------------------------------------------
 .../tinkerpop/gremlin/process/traversal/Order.java    | 14 ++++++--------
 1 file changed, 6 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/33e23923/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Order.java
----------------------------------------------------------------------
diff --git a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Order.java
b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Order.java
index 3a3ae2b..7c3475a 100644
--- a/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Order.java
+++ b/gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/process/traversal/Order.java
@@ -30,10 +30,9 @@ public enum Order implements Comparator<Object> {
     incr {
         @Override
         public int compare(final Object first, final Object second) {
-            if (first instanceof Number && second instanceof Number) {
-                return NumberHelper.compare((Number) first, (Number) second);
-            }
-            return Comparator.<Comparable>naturalOrder().compare((Comparable) first,
(Comparable) second);
+            return first instanceof Number && second instanceof Number
+                    ? NumberHelper.compare((Number) first, (Number) second)
+                    : Comparator.<Comparable>naturalOrder().compare((Comparable) first,
(Comparable) second);
         }
 
         @Override
@@ -43,10 +42,9 @@ public enum Order implements Comparator<Object> {
     }, decr {
         @Override
         public int compare(final Object first, final Object second) {
-            if (first instanceof Number && second instanceof Number) {
-                return NumberHelper.compare((Number) second, (Number) first);
-            }
-            return Comparator.<Comparable>reverseOrder().compare((Comparable) first,
(Comparable) second);
+            return first instanceof Number && second instanceof Number
+                    ? NumberHelper.compare((Number) second, (Number) first)
+                    : Comparator.<Comparable>reverseOrder().compare((Comparable) first,
(Comparable) second);
         }
 
         @Override


Mime
View raw message