]
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.