You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/01/25 08:26:54 UTC

[GitHub] clintropolis commented on a change in pull request #6914: Issue#6892- Replaced Math.random() with ThreadLocalRandom.current().nextDouble()

clintropolis commented on a change in pull request #6914: Issue#6892- Replaced Math.random() with ThreadLocalRandom.current().nextDouble()
URL: https://github.com/apache/incubator-druid/pull/6914#discussion_r250899636
 
 

 ##########
 File path: codestyle/druid-forbidden-apis.txt
 ##########
 @@ -31,5 +31,6 @@ java.lang.String#replaceAll(java.lang.String,java.lang.String) @ Use one of the
 java.lang.String#replaceFirst(java.lang.String,java.lang.String) @ Use String.indexOf() and substring methods, or compile and cache a Pattern explicitly
 java.util.LinkedList @ Use ArrayList or ArrayDeque instead
 java.util.Random#<init>() @ Use ThreadLocalRandom.current() or the constructor with a seed (the latter in tests only!)
+java.lang.Math#random() @ Use ThreadLocalRandom.current() or the constructor with a seed
 
 Review comment:
   > or the constructor with a seed
   
   nit: please remove this part of the error message. It makes sense for the `Random` use case where `new Random(7)` or whatever is useful to allow stable tests, but isn't applicable for `Math.random`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org