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

XMLWordPrintable

        A bug has been fixed in enhancement JDK-8176894 that inadvertently introduced erroneous behavior in the `TreeMap.computeIfAbsent` method. The erroneous behavior was that, if the map contained an existing mapping whose value was null, the `computeIfAbsent` method would immediately return null. Other `TreeMap` methods modified by the enhancement were unaffected. To conform with the specification, `computeIfAbsent` now calls the mapping function and updates the map with the function's result.

              Assignee:
              Stuart Marks
              Reporter:
              Stuart Marks
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: