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

Add ResourceHashtable::xxx_if_absent

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 15
    • 15
    • hotspot
    • b24

    Description

      A common pattern when using ResourceHashTable is:

      if (table.get(k) == NULL) table.add(k,v);

      This runs the lookup code twice. By providing methods "xxx_if_absent" - similar to how j.u.Map does - we could reduce the number of lookups needed.

      Attachments

        Issue Links

          Activity

            People

              stuefe Thomas Stuefe
              stuefe Thomas Stuefe
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: