CompareTo code seems odd, ok?

2011-10-07 Thread Dave Brosius
This comparator seems odd to me, as it never returns (d) but perhaps i'm confused, is it ok? org.apache.jackrabbit.core.query.lucene.sort.ValueComparableWrapper public int compareTo(ValueComparableWrapper o) { final int d = compare(v, o.getValue()); if (d != 0) { if

CompareTo code seems odd, ok?

2011-10-08 Thread Dave Brosius
This comparator seems odd to me, as it never returns (d) but perhaps i'm confused, is it ok? org.apache.jackrabbit.core.query.lucene.sort.ValueComparableWrapper public int compareTo(ValueComparableWrapper o) { final int d = compare(v, o.getValue()); if (d != 0) { if

Re: CompareTo code seems odd, ok?

2011-10-08 Thread Julian Reschke
On 2011-10-08 05:48, Dave Brosius wrote: This comparator seems odd to me, as it never returns (d) but perhaps i'm confused, is it ok? org.apache.jackrabbit.core.query.lucene.sort.ValueComparableWrapper public int compareTo(ValueComparableWrapper o) { final int d = compare(v, o.getValue()); if (

Re: CompareTo code seems odd, ok?

2011-10-10 Thread Julian Reschke
On 2011-10-08 09:48, Julian Reschke wrote: On 2011-10-08 05:48, Dave Brosius wrote: This comparator seems odd to me, as it never returns (d) but perhaps i'm confused, is it ok? org.apache.jackrabbit.core.query.lucene.sort.ValueComparableWrapper public int compareTo(ValueComparableWrapper o) {

Re: CompareTo code seems odd, ok?

2011-10-10 Thread Alex Parvulescu
Hi guys, excuse the delay. The code you are talking about is most probably my copy/paste error :) I'll update the compareTo method. the code is still experimental (that explains why there are no tests yet for it). this feature is enabled via a system property (so we can test the performance of t

Re: CompareTo code seems odd, ok?

2011-10-10 Thread Julian Reschke
On 2011-10-10 16:01, Alex Parvulescu wrote: Hi guys, excuse the delay. The code you are talking about is most probably my copy/paste error :) I'll update the compareTo method. the code is still experimental (that explains why there are no tests yet for it). this feature is enabled via a system