jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Brosius <dbros...@apache.org>
Subject CompareTo code seems odd, ok?
Date Sat, 08 Oct 2011 03:48:03 GMT
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 (reversed) {
                 return -d;
             }
             return -d;
         }
         return 0;
     }



Mime
View raw message