Bug in SortedList.indexOf ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bug in SortedList.indexOf ?

hbrands
Administrator
Hi all,

please have a look at
http://java.net/jira/browse/GLAZEDLISTS-528
and
http://glazedlists.1045722.n5.nabble.com/SortedList-indexOf-bug-td3421239.html

Could it be, that SortedList.indexOf misbehaves in case of mode AVOID_MOVING_ELEMENTS?

Shouldn't it read
if(mode != STRICT_SORT_ORDER || comparator == null) return super.indexOf(object);
instead of
if(mode != STRICT_SORT_ORDER || comparator == null) return source.indexOf(object);
?

Thanks for your help,
Holger

Reply | Threaded
Open this post in threaded view
|

Re: Bug in SortedList.indexOf ?

Rob Eden
Sorry, kind of zoned out for two weeks. :-)

Yes, I think I agree with you. Assuming tests agree, of course...

Rob

On Sat, Oct 29, 2011 at 9:55 AM, Holger Brands <[hidden email]> wrote:
Hi all,

please have a look at
http://java.net/jira/browse/GLAZEDLISTS-528
and
http://glazedlists.1045722.n5.nabble.com/SortedList-indexOf-bug-td3421239.html

Could it be, that SortedList.indexOf misbehaves in case of mode AVOID_MOVING_ELEMENTS?

Shouldn't it read
if(mode != STRICT_SORT_ORDER || comparator == null) return super.indexOf(object);
instead of
if(mode != STRICT_SORT_ORDER || comparator == null) return source.indexOf(object);
?

Thanks for your help,
Holger


Reply | Threaded
Open this post in threaded view
|

Re: Bug in SortedList.indexOf ?

hbrands
Administrator
Thanks for the feedback, Rob.
It's fixed in SVN with Rev. 2328.

Holger

2011/11/11 Rob Eden <[hidden email]>
Sorry, kind of zoned out for two weeks. :-)

Yes, I think I agree with you. Assuming tests agree, of course...

Rob


On Sat, Oct 29, 2011 at 9:55 AM, Holger Brands <[hidden email]> wrote:
Hi all,

please have a look at
http://java.net/jira/browse/GLAZEDLISTS-528
and
http://glazedlists.1045722.n5.nabble.com/SortedList-indexOf-bug-td3421239.html

Could it be, that SortedList.indexOf misbehaves in case of mode AVOID_MOVING_ELEMENTS?

Shouldn't it read
if(mode != STRICT_SORT_ORDER || comparator == null) return super.indexOf(object);
instead of
if(mode != STRICT_SORT_ORDER || comparator == null) return source.indexOf(object);
?

Thanks for your help,
Holger