Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8024009

Remove jdk.map.useRandomSeed system property

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P3
    • 8
    • 8
    • core-libs
    • None

    Description

      The random hashSeed was added as part of the alternative hashing work (JDK-7126277) as an added protection against hash collisions.

      With the balanced tree work for HashMap & LinkedHashMap (JDK-8005698 and JDK-8010325), the alternative hash algorithm was removed, and the random hashSeed was made optional with a new system property, jdk.map.useRandomSeed.

      Further work and analysis has been done in HashMap & LinkedHashMap (JDK-8023463), and the code that balanced trees use for comparing keys is being expanded. At this point, using the random hashSeed adds no meaningful protection against hash collisions. The performance benefit provided by balanced trees is present regardless of the hashSeed - there is no change in worst-case performance. Given this, use of hashSeed by HashMap & LinkedHashMap will be removed in JDK-8023463.

      This leaves Hashtable & WeakHashMap as the two remaining classes using a random hashSeed. I propose this usage be removed as well, and that the jdk.map.useRandomSeed property be withdrawn from jdk8.

      Attachments

        Issue Links

          Activity

            People

              bchristi Brent Christian
              bchristi Brent Christian
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: