Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 5342 invoked from network); 27 Aug 2009 23:49:23 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 27 Aug 2009 23:49:23 -0000 Received: (qmail 46355 invoked by uid 500); 27 Aug 2009 23:49:23 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 46284 invoked by uid 500); 27 Aug 2009 23:49:23 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 46275 invoked by uid 99); 27 Aug 2009 23:49:22 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 27 Aug 2009 23:49:22 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED 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, 27 Aug 2009 23:49:20 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 3F5B7234C044 for ; Thu, 27 Aug 2009 16:48:59 -0700 (PDT) Message-ID: <1769229822.1251416939245.JavaMail.jira@brutus> Date: Thu, 27 Aug 2009 16:48:59 -0700 (PDT) From: "Jesse Wilson (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-6323) Simplify and speed-up shuffle, add a non-probabilistic test 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 Simplify and speed-up shuffle, add a non-probabilistic test ----------------------------------------------------------- Key: HARMONY-6323 URL: https://issues.apache.org/jira/browse/HARMONY-6323 Project: Harmony Issue Type: Improvement Components: Classlib Environment: SVN Revision 801399 Reporter: Jesse Wilson Shuffle needlessly tests Random.nextInt() for a negative value It iterates from index N-1 to 0, which means it always swaps index 0 with itself needlessly. It is only tested with probabilistic tests, the patch adds a proper test. Note that the attached test also passes on the RI. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.