You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by "Christopher Tubbs (Jira)" <ji...@apache.org> on 2019/08/27 23:43:00 UTC

[jira] [Resolved] (ACCUMULO-2486) Use covariant return types in SKVI.deepCopy

     [ https://issues.apache.org/jira/browse/ACCUMULO-2486?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Christopher Tubbs resolved ACCUMULO-2486.
-----------------------------------------
    Resolution: Won't Fix

Closing as won't fix because, according to the last comment, this would break some subclasses. If this is still a desired change, please open a new issue or pull request at https://github.com/apache/accumulo/issues

> Use covariant return types in SKVI.deepCopy
> -------------------------------------------
>
>                 Key: ACCUMULO-2486
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2486
>             Project: Accumulo
>          Issue Type: Improvement
>            Reporter: Mike Drob
>            Priority: Major
>
> Starting with Java 5, subclasses with method overrides can declare covariant return types. In general, I believe that we want to do this, as it provides stronger type guarantees with not a lot of extra cost.
> Example:
> {code}
> public interface SortedKeyValueIterator {
>       SortedKeyValueIterator deepCopy(IteratorEnvironment env);
> }
> public interface InterruptibleIterator extends SortedKeyValueIterator {
>       @Override
>       InterruptibleIterator deepCopy(IteratorEnvironment env);
> }
> {code}
> I believe this change will be fully backwards compatible with the existing APIs.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)