Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
New
Description
SimpleRateLimiter.pause() uses an uncheck cast of longs to ints:
Thread.sleep((int) (pauseNS/1000000), (int) (pauseNS % 1000000));
Although we check that pauseNS is positive, however if it's large enough the cast to int produces a negative value, causing Thread.sleep to throw an exception.
We should protect for it.