dcapwell commented on code in PR #264:
URL: https://github.com/apache/cassandra-accord/pull/264#discussion_r2632667487
##########
accord-core/src/main/java/accord/utils/LargeBitSet.java:
##########
@@ -443,10 +448,16 @@ private int indexOf(int i)
{
int index = i >>> 6;
if (index >= length)
- throw new IndexOutOfBoundsException(String.format("%d >= %d",
index, length));
+ throw new IndexOutOfBoundsException(String.format("Unable to
access bit %d; must be between 0 and %d", i, size() - 1));
Review Comment:
this keeps the 2 impl consistent even with the error type + msg. I also
find `index >= length` harder to work with than the actual input / size
--
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]