[infinispan-issues] [JBoss JIRA] (ISPN-3675) Revisit covariant return type for various implementations
Tristan Tarrant (JIRA)
issues at jboss.org
Mon Jan 12 09:17:09 EST 2015
[ https://issues.jboss.org/browse/ISPN-3675?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tristan Tarrant reassigned ISPN-3675:
-------------------------------------
Assignee: (was: Mircea Markus)
> 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
>
> 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 was sent by Atlassian JIRA
(v6.3.11#6341)
More information about the infinispan-issues
mailing list