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


##########
accord-core/src/main/java/accord/utils/LargeBitSet.java:
##########
@@ -174,9 +179,12 @@ public boolean unset(int i)
         return true;
     }
 
+    @Override
     public final boolean get(int i)
     {
         int index = indexOf(i);
+        if (index == UNKNOWN)

Review Comment:
   all read APIs default to the negative case if you ask out of bounds.  This 
keeps things consistent and easy to work with.  
   
   The write APIs all reject as its clear you did something wrong.
   
   One thing we talked about in slack was exposing capacity, but that also 
implies that every caller gets updated to check that in the loop where as the 
pattern has been 
   
   ```
   for (int index = set.nextSetBit(0); index != -1; index = 
set.nextSetBit(index))
   ```
   
   



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