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

Release Note: TreeMap.computeIfAbsent Mishandles Existing Entries Whose Values Are null

    XMLWordPrintable

    Details

      Description

      Enhancement JDK-8176894 inadvertently introduced erroneous behavior in the `TreeMap.computeIfAbsent` method. The other `TreeMap` methods that were modified by this enhancement are unaffected. The erroneous behavior is that, if the map contains an existing mapping whose value is null, the `computeIfAbsent` method immediately returns null. To conform with the specification, `computeIfAbsent` should instead call the mapping function and update the map with the function's result.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              cwayne Clifford Wayne
              Reporter:
              smarks Stuart Marks
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: