harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
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 GMT
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;



Mime
View raw message