You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The title pretty much says it all. As soon as any caller invokes count() - at some indefinite time after construction - a NumericRange[Long] with a long range throws an IllegalArgumentException.
count() is used very ubiquitously in the implementation of the class - even in toString() - so it's not really avoidable.
I know the current behavior is by design... but would it break a lot of things if count()/length() returned a Long?
@dcsobral said:
It would break things, it would preclude array-based implementations, and it would impose a performance penalty on anything that used indices.
The title pretty much says it all. As soon as any caller invokes count() - at some indefinite time after construction - a NumericRange[Long] with a long range throws an IllegalArgumentException.
count() is used very ubiquitously in the implementation of the class - even in toString() - so it's not really avoidable.
I know the current behavior is by design... but would it break a lot of things if count()/length() returned a Long?
FWIW, this was driven by StackOverflow post http://stackoverflow.com/questions/9888706 .
The text was updated successfully, but these errors were encountered: