United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7180621 fix broken threshold value in 7180240
JDK-7180621 : fix broken threshold value in 7180240

Details
Type:
Bug
Submit Date:
2012-06-28
Status:
Closed
Updated Date:
2012-10-29
Project Name:
JDK
Resolved Date:
2012-07-23
Component:
core-libs
OS:
generic
Sub-Component:
java.util
CPU:
generic
Priority:
P2
Resolution:
Fixed
Affected Versions:
7u6
Fixed Versions:
7u6 (b20)

Related Reports
Backport:
Relates:

Sub Tasks

Description
The incorrect value was committed (again) for the Hashtable alternative hashing threshold.

                                    

Comments
EVALUATION

update the value to the correct value.
                                     
2012-06-28
SUGGESTED FIX

Sent to reviewers email.

diff --git a/src/share/classes/java/util/Hashtable.java b/src/share/classes/java/util/Hashtable.java
--- a/src/share/classes/java/util/Hashtable.java
+++ b/src/share/classes/java/util/Hashtable.java
@@ -167,13 +167,13 @@
      * The default threshold of map capacity above which alternative hashing is
      * used for String keys. Alternative hashing reduces the incidence of
      * collisions due to weak hash code calculation for String keys.
-     * <p/>
+     * <p>
      * This value may be overridden by defining the system property
      * {@code jdk.map.althashing.threshold}. A property value of {@code 1}
      * forces alternative hashing to be used at all times whereas
      * {@code -1} value ensures that alternative hashing is never used.
      */
-    static final int ALTERNATIVE_HASHING_THRESHOLD_DEFAULT = 512;
+    static final int ALTERNATIVE_HASHING_THRESHOLD_DEFAULT = Integer.MAX_VALUE;
 
     /**
      * holds values which can't be initialized until after VM is booted.
                                     
2012-06-28
WORK AROUND

http://hg.openjdk.java.net/jdk7u/jdk7u-dev/jdk/rev/9ca4ae899116
                                     
2012-07-09
SUGGESTED FIX

http://cr.openjdk.java.net/~mduigou/7180621/0/webrev/
                                     
2012-07-09



Hardware and Software, Engineered to Work Together