commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henri Yandell (JIRA)" <j...@apache.org>
Subject [jira] Updated: (LANG-472) RandomUtils.nextLong() get all even number
Date Thu, 30 Apr 2009 05:49:30 GMT

     [ https://issues.apache.org/jira/browse/LANG-472?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Henri Yandell updated LANG-472:
-------------------------------

    Fix Version/s:     (was: 3.0)
                   2.x

JVMRandom is removed for 3.0, along with RandomUtils, so making this a 2.x issue.

> RandomUtils.nextLong() get all even number
> ------------------------------------------
>
>                 Key: LANG-472
>                 URL: https://issues.apache.org/jira/browse/LANG-472
>             Project: Commons Lang
>          Issue Type: Bug
>         Environment: all system
>            Reporter: zhangruimin
>             Fix For: 2.x
>
>         Attachments: lang-472.patch
>
>
> when we use the following code , we can see that the method produce only even number.
>          while (true) {
> //        for (int i = 0; i < 100; i++) {
>             if (RandomUtils.nextLong() % 2 == 1) {
>                 System.out.println("ok");
>             }
>         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message