Uploaded image for project: 'JBoss Data Grid'
  1. JBoss Data Grid
  2. JDG-1143

Merge implementation is not correct on SimpleCache

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Verified (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: JDG 7.1.0 GA
    • Fix Version/s: JDG 7.2 DR1, JDG 7.2 GA
    • Component/s: None
    • Labels:
      None

      Description

      Merge method is not correctly implemented in SimpleCache.
      Merge should work this way :

      • if the key is not present, add the value
      • If the key is present, apply the function between the existing key's value and the given value and replace the key with the merged result
      • If the merge function returns null, remove the key

      The case that should work as "putIfAbsent" does't work. Merge function is applied to null and the given value.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  galder.zamarreno Galder ZamarreƱo
                  Reporter:
                  galder.zamarreno Galder ZamarreƱo
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: