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
I ran into a crash that was a stupid error on my part, but perhaps could be handled more gracefully by the library or at least be well-documented. If I set a progress value that is outside the range of 0 to max, I get a crash.
I could see perhaps a modification to this library that, when receiving a progress value, floors or ceilings it to the acceptable range. For example, if a progress of 6 is set on a pie view with a max of 4, the effective progress value would become 4. Likewise for negative numbers, if progress is set as -3, then the effective progress for display becomes 0.
If you'd rather not sanitize inputs in that way, I'd suggest either a note about it in the documentation and/or a RuntimeException subclass that is thrown when this occurs, and a throws declaration on the setProgress and setMax signatures.
The text was updated successfully, but these errors were encountered:
I ran into a crash that was a stupid error on my part, but perhaps could be handled more gracefully by the library or at least be well-documented. If I set a progress value that is outside the range of
0
tomax
, I get a crash.I could see perhaps a modification to this library that, when receiving a progress value, floors or ceilings it to the acceptable range. For example, if a progress of
6
is set on a pie view with a max of4
, the effectiveprogress
value would become4
. Likewise for negative numbers, ifprogress
is set as-3
, then the effectiveprogress
for display becomes0
.If you'd rather not sanitize inputs in that way, I'd suggest either a note about it in the documentation and/or a
RuntimeException
subclass that is thrown when this occurs, and athrows
declaration on thesetProgress
andsetMax
signatures.The text was updated successfully, but these errors were encountered: