[jira] [Created] (OFBIZ-11020) Use Random.nextDouble() instead of Math.random()

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (OFBIZ-11020) Use Random.nextDouble() instead of Math.random()

Nicolas Malin (Jira)
bd2019us created OFBIZ-11020:
--------------------------------

             Summary: Use Random.nextDouble() instead of Math.random()
                 Key: OFBIZ-11020
                 URL: https://issues.apache.org/jira/browse/OFBIZ-11020
             Project: OFBiz
          Issue Type: Improvement
          Components: framework
            Reporter: bd2019us


When using Math.random instead of Random.nextDouble, there is a slight performance cost. Due to Math.random invoking an instance of Random This cost can be alleviated by directly using Random.nextDouble. This also allows for more control over the randomization in the future.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)