belliottsmith commented on code in PR #249:
URL: https://github.com/apache/cassandra-accord/pull/249#discussion_r2332759247


##########
accord-core/src/main/java/accord/utils/LargeBitSet.java:
##########
@@ -320,7 +320,7 @@ public final int nextSetBitBefore(int i, int exclBound, int 
ifNotFound)
     private int nextSetBitInternal(int i, int exclIndexBound, int ifNotFound)
     {
         Invariants.requireArgument(i >= 0);
-        Invariants.requireArgument(i <= size());

Review Comment:
   My only concern here is that this is inconsistent with get/set etc. We 
should either consistently change all of these methods to support indexes 
outside of the range, or we should retain the existing behaviour and simply 
expose `capacity()` in the interface. I don't have a strong opinion, though I 
lean towards the `capacity()` approach as it is is more likely than not to be a 
bug to access outside of the allocated range.



-- 
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