mirror of https://github.com/apache/cassandra
put returns previous value, so separate get is redundant
git-svn-id: https://svn.apache.org/repos/asf/incubator/cassandra/trunk@761412 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c386d36a69
commit
6fc6e048a3
|
|
@ -72,10 +72,9 @@ class EfficientBidiMap implements Serializable
|
|||
|
||||
public void put(String key, IColumn column)
|
||||
{
|
||||
IColumn oldColumn = map_.get(key);
|
||||
if( oldColumn != null )
|
||||
sortedSet_.remove( oldColumn );
|
||||
map_.put(key, column);
|
||||
IColumn oldColumn = map_.put(key, column);
|
||||
if (oldColumn != null)
|
||||
sortedSet_.remove(oldColumn);
|
||||
sortedSet_.add(column);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue