Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-7631

Cache.entrySet() entries don't implement Map.Entry.equals() correctly

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 9.0.0.CR2
    • Fix Version/s: 9.0.1.Final
    • Component/s: Core
    • Labels:
      None

      Description

      The Map.Entry.equals() javadoc says "Returns true if the given object is also a map entry and the two entries represent the same mapping.", meaning any other metadata stored in cache entries (e.g. lifespan) must be ignored for the purpose of checking equality. In other words, this code should work regardless of what entries are stored in the cache or in the invocation context:

      cache.entrySet().contains(new AbstractMap.SimpleEntry("k", "v"))
      

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  pruivo Pedro Ruivo
                  Reporter:
                  dan.berindei Dan Berindei
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  1 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: