Details

      Description

      The TreeMap class now provides overriding implementations of the `putIfAbsent`, `computeIfAbsent`, `computeIfPresent`, `compute`, and `merge` methods. The new implementations provide a performance improvement. However, if the function provided to the `compute-` or `merge` methods modifies the map, ConcurrentModificationException may be thrown, because the function that is provided to these methods is prohibited from modifying the map. If a ConcurrentModificationException occurs, the function must either be changed to avoid modifying the map, or the surrounding code should be rewritten to replace uses of the `compute-` and `merge` methods with conventional Map methods such as `get` and `put`.

      See JDK-8227666 for further information.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: