Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 31444 invoked from network); 25 Jul 2007 11:39:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 25 Jul 2007 11:39:33 -0000 Received: (qmail 85206 invoked by uid 500); 25 Jul 2007 11:39:34 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 85189 invoked by uid 500); 25 Jul 2007 11:39:34 -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 85180 invoked by uid 99); 25 Jul 2007 11:39:34 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2007 04:39:34 -0700 X-ASF-Spam-Status: No, hits=-99.5 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jul 2007 04:39:32 -0700 Received: by eris.apache.org (Postfix, from userid 65534) id 7090C1A981A; Wed, 25 Jul 2007 04:39:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r559406 - /harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java Date: Wed, 25 Jul 2007 11:39:12 -0000 To: commits@harmony.apache.org From: leoli@apache.org X-Mailer: svnmailer-1.1.0 Message-Id: <20070725113912.7090C1A981A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: leoli Date: Wed Jul 25 04:39:11 2007 New Revision: 559406 URL: http://svn.apache.org/viewvc?view=rev&rev=559406 Log: Apply patch for HARMONY-4532([classlib][luni] HashMap constructor should re-calculate the capacity). Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java Modified: harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java?view=diff&rev=559406&r1=559405&r2=559406 ============================================================================== --- harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java (original) +++ harmony/enhanced/classlib/trunk/modules/luni/src/main/java/java/util/HashMap.java Wed Jul 25 04:39:11 2007 @@ -282,6 +282,7 @@ */ public HashMap(int capacity, float loadFactor) { if (capacity >= 0 && loadFactor > 0) { + capacity = caculateCapacity(capacity); elementCount = 0; elementData = newElementArray(capacity == 0 ? 1 : capacity); this.loadFactor = loadFactor;