[infinispan-issues] [JBoss JIRA] (ISPN-3675) Revisit covariant return type for various implementations

Mircea Markus (JIRA) issues at jboss.org
Fri Jan 24 13:10:28 EST 2014


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

Mircea Markus updated ISPN-3675:
--------------------------------

    Component/s: Core

    
> Revisit covariant return type for various implementations
> ---------------------------------------------------------
>
>                 Key: ISPN-3675
>                 URL: https://issues.jboss.org/browse/ISPN-3675
>             Project: Infinispan
>          Issue Type: Enhancement
>          Components: Core
>    Affects Versions: 6.0.0.CR1
>            Reporter: William Burns
>            Assignee: Mircea Markus
>
> We use interfaces all over the place, which is great.  However a lot of implementations currently only define their return types to be that of the type defined in the interface.  However we can change the implementation return type of the method to be covariant which allows for direct users of the implementation to use the subclass if desired.
> This especially came up in the discussion here: https://github.com/infinispan/infinispan/pull/2177/files#r7375883 as we could remove redundant casts which would provide cleaner code.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the infinispan-issues mailing list