accumulo-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Drob (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (ACCUMULO-2600) Key.clone() should return type Key
Date Mon, 31 Mar 2014 23:37:28 GMT

    [ https://issues.apache.org/jira/browse/ACCUMULO-2600?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13955882#comment-13955882
] 

Mike Drob commented on ACCUMULO-2600:
-------------------------------------

Also, the same logic can be applied to {{MemKey}}. Which, incidentally, might be broken too.

{code}
  public MemKeyConversionIterator(SortedKeyValueIterator<Key,Value> source, MemKey startKey)
{
    this(source);
    try {
      if (currKey != null)
        currKey = (MemKey) startKey.clone();
    } catch (CloneNotSupportedException e) {
      // MemKey is supported
    }
  }
{code}

This is in the constructor, and I think that {{currKey}} will always be null.

> Key.clone() should return type Key
> ----------------------------------
>
>                 Key: ACCUMULO-2600
>                 URL: https://issues.apache.org/jira/browse/ACCUMULO-2600
>             Project: Accumulo
>          Issue Type: Bug
>          Components: client
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: Mike Drob
>            Assignee: Mike Drob
>            Priority: Critical
>              Labels: API
>             Fix For: 1.4.6, 1.5.2, 1.6.0
>
>
> {{Key.clone()}} can return {{Key}} instead of {{Object}} like it does currently. This
is nicer on end-users of the API.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message