[infinispan-issues] [JBoss JIRA] (ISPN-7631) Cache.entrySet() entries don't implement Map.Entry.equals() correctly

Ryan Emerson (JIRA) issues at jboss.org
Tue May 23 08:41:00 EDT 2017


     [ https://issues.jboss.org/browse/ISPN-7631?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ryan Emerson resolved ISPN-7631.
--------------------------------
    Resolution: Done


> Cache.entrySet() entries don't implement Map.Entry.equals() correctly
> ---------------------------------------------------------------------
>
>                 Key: ISPN-7631
>                 URL: https://issues.jboss.org/browse/ISPN-7631
>             Project: Infinispan
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 9.0.0.CR2
>            Reporter: Dan Berindei
>            Assignee: Pedro Ruivo
>             Fix For: 9.0.1.Final
>
>
> 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:
> {code:java}
> cache.entrySet().contains(new AbstractMap.SimpleEntry("k", "v"))
> {code}



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the infinispan-issues mailing list