[infinispan-issues] [JBoss JIRA] (ISPN-7108) Use wildcard in methods returning keys

Radim Vansa (JIRA) issues at jboss.org
Wed Oct 12 06:15:01 EDT 2016


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

Radim Vansa updated ISPN-7108:
------------------------------
              Status: Pull Request Sent  (was: Open)
    Git Pull Request: https://github.com/infinispan/infinispan/pull/4613


> Use wildcard in methods returning keys
> --------------------------------------
>
>                 Key: ISPN-7108
>                 URL: https://issues.jboss.org/browse/ISPN-7108
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: Core
>            Reporter: Radim Vansa
>            Assignee: Radim Vansa
>
> When a command uses generics (that's the case of functional commands), it stores keys in {{Collection<? extends K>}}. That does not work well with {{getAffectedKeys()}} returning {{Set<Object>}} - besides Collection/Set the generic type also cannot match (because returning {{Set<Object>}} means that you can theoretically insert any {{Object}}). Changing that to wildcard deals with this and makes the collection effectively read-only.



--
This message was sent by Atlassian JIRA
(v6.4.11#64026)


More information about the infinispan-issues mailing list