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

Add ResourceHashtable::xxx_if_absent

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 15
    • Component/s: hotspot
    • Subcomponent:
    • Resolved In Build:
      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

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

                Dates

                Created:
                Updated:
                Resolved: