You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by "dcapwell (via GitHub)" <gi...@apache.org> on 2023/03/11 02:26:21 UTC

[GitHub] [cassandra-accord] dcapwell commented on a diff in pull request #30: CEP-15: (Accord) Migrate Accord away from JDK random to a new interface RandomSource

dcapwell commented on code in PR #30:
URL: https://github.com/apache/cassandra-accord/pull/30#discussion_r1133012935


##########
accord-core/src/main/java/accord/primitives/RangeDeps.java:
##########
@@ -612,14 +612,7 @@ protected RangeDeps build(TxnId[] txnIds, Range[] ranges, int[] txnIdsToRanges)
 
     public static SymmetricComparator<? super Range> rangeComparator()
     {
-        return RangeDeps::compare;
-    }
-
-    public static int compare(Range left, Range right)
-    {
-        int c = left.start().compareTo(right.start());
-        if (c == 0) c = left.end().compareTo(right.end());
-        return c;
+        return Range::compare;

Review Comment:
   these are the same, so removed duplication of code.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org