directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: [ApacheDS][AvlTreeMap] insert() fails to replace old value
Date Thu, 02 Apr 2009 00:29:37 GMT

On Apr 1, 2009, at 11:49 AM, Kiran Ayyagari wrote:

> hi Alex,
>   Thanks for reporting this, have fixed at revision [1].
>   I think there is no way with generics that we can return the  
> replaced value V
>   cause the signature of insert is - *K* insert( K, V )

Why isn't it V insert(K, V)?  AvlTreeMap doesn't appear to extend  
anything.... I don't see how returning the supplied key is very useful  
whereas returning the previous value if any is quite useful.

david jencks

> [1]
> Kiran Ayyagari
> Alex Karasulu wrote:
>> Hi Kiran,
>> I have a problem you might be able to help me with.  It seems the  
>> AvlTreeMap does not replace old values when someone inserts a K/V  
>> pair using the same key.  I've created a simple test case which is  
>> now being ignored in AvlTreeMap on my branch.  Here's the commit  
>> for the test:
>> <

>> >
>> If you can look at this and fix fast great but if not I can fix as  
>> well.  Just have not ventured into the AVL tree code just yet.  
>> Thanks,
>> Alex

View raw message