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


##########
accord-core/src/main/java/accord/primitives/Deps.java:
##########
@@ -55,12 +79,23 @@ public static abstract class AbstractBuilder<T extends 
Deps> implements AutoClos
 
         public AbstractBuilder<T> add(Seekable keyOrRange, TxnId txnId)
         {
-            switch (keyOrRange.domain())
+            Invariants.checkArgument(keyOrRange.domain() == txnId.domain(), 
keyOrRange + " is not same domain as " + txnId);

Review Comment:
   The following check should work better
   
   ```
   Invariants.checkArgument(txnId.domain().isRange() || keyOrRange.domain() == 
txnId.domain(), keyOrRange + " is not same domain as " + txnId);
   ```



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to