jcwinters commented on PR #1379: URL: https://github.com/apache/commons-lang/pull/1379#issuecomment-2863478821
> A simpler solution would be to: > > * Change the type of `bitIndex` to `long`, so it can count up to `8 * Integer.MAX_VALUE` > * Refactor the expression that computes the `cacheSize` argument in a way that it does not overflow: > I considered that, changing `bitindex` to long adds some casting complexity I didn't want to deal with as arrays are int indexed. And I didn't particularly want to change the randomization algorithm, as to get rid of overflow possibilities I'd have to change to something that doesn't have rejections, and it made my head hurt. -- 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: issues-unsubscr...@commons.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org