Return-Path: Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: (qmail 27416 invoked from network); 30 Apr 2009 05:49:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 30 Apr 2009 05:49:53 -0000 Received: (qmail 8393 invoked by uid 500); 30 Apr 2009 05:49:52 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 8292 invoked by uid 500); 30 Apr 2009 05:49:52 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 8282 invoked by uid 99); 30 Apr 2009 05:49:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2009 05:49:52 +0000 X-ASF-Spam-Status: No, hits=-1999.6 required=10.0 tests=ALL_TRUSTED,SUBJECT_FUZZY_TION X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 30 Apr 2009 05:49:51 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B93A8234C003 for ; Wed, 29 Apr 2009 22:49:30 -0700 (PDT) Message-ID: <1138081221.1241070570741.JavaMail.jira@brutus> Date: Wed, 29 Apr 2009 22:49:30 -0700 (PDT) From: "Henri Yandell (JIRA)" To: issues@commons.apache.org Subject: [jira] Updated: (LANG-472) RandomUtils.nextLong() get all even number In-Reply-To: <258577176.1227670364647.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ 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.