[
https://issues.apache.org/jira/browse/ACCUMULO-1897?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13958617#comment-13958617
]
Sean Busbey commented on ACCUMULO-1897:
---------------------------------------
I believe this constructor can be removed.
# AFAICT, it's only used in the deepCopy implementation.
# [the API for deepCopy says that it makes a copy as if seek() has not been
called|http://accumulo.apache.org/1.5/apidocs/org/apache/accumulo/core/iterators/SortedKeyValueIterator.html#deepCopy(org.apache.accumulo.core.iterators.IteratorEnvironment)]
# all of the other methods require a seek call before they can be used
# seek overwrites currKey
Rather than add a test to express this error and fix it, we should pull the
Constructor and update deepCopy to use the single argument constructor.
> Bug in MemKeyConversionIterator constructor
> -------------------------------------------
>
> Key: ACCUMULO-1897
> URL: https://issues.apache.org/jira/browse/ACCUMULO-1897
> Project: Accumulo
> Issue Type: Bug
> Components: tserver
> Affects Versions: 1.5.0, 1.5.1
> Reporter: Bill Havanki
> Fix For: 1.5.2, 1.6.0
>
>
> The constructor for {{InMemoryMap.MemKeyConversionIterator}} which takes a
> starting key does not correctly clone the key. The parameter to the
> constructor is {{startKey}}, but the code looks at the {{currKey}} field to
> check whether a key is available.
> {code:java}
> if (currKey != null) // <- should be startKey != null
> currKey = (MemKey) startKey.clone();
> {code}
> This class was introduced in version 1.5.0, and is not present in 1.4.x.
--
This message was sent by Atlassian JIRA
(v6.2#6252)