rmuir commented on code in PR #12772: URL: https://github.com/apache/lucene/pull/12772#discussion_r1383365289
########## gradle/validation/forbidden-apis/defaults.tests.txt: ########## @@ -21,3 +21,7 @@ java.lang.System#currentTimeMillis() @ Don't depend on wall clock times #java.lang.System#nanoTime() @ Don't depend on wall clock times java.text.Collator#compare(**) @ Use LuceneTestCase.collate instead, which can avoid JDK-8071862 + +# #12771: dangerously slow implementation when the range is small +java.util.Random#nextInt(int,int) +java.util.Random#nextLong(long,long) Review Comment: The bad guy isn't `java.util.Random` it is worse, right? It is `java.util.random.RandomGenerator` that specifies this insane behavior, and that crazy behavior is implemented by not just `Random` but also `SecureRandom` (should be separately banned already if not: insanely trappy!), `SplittableRandom`, `ThreadLocalRandom`, etc. -- 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...@lucene.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org