Details
-
Bug
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
None
-
None
-
None
Description
Probably shouldn't ever cause an issue, especially since Thread.sleep() can cause longer delays beyond your control anyway, but for larger values this could still behave unpredicatably in practice.
Thread.sleep(r.nextInt(maxSleepTime) + minSleepTime);
should be
Thread.sleep(r.nextInt(maxSleepTime - minSleepTime) + minSleepTime)