标签:
Collections.sort(saleList, new Comparator<DbViewProductSale>() {
@Override
public int compare(DbViewProductSale paramT1, DbViewProductSale paramT2) {
// return paramT1.getSaleDate().before(paramT2.getSaleDate()) ? -1 : 1;
return paramT1.getSaleDate().compareTo(paramT2.getSaleDate());
}
});
ref : http://blog.csdn.net/ghsau/article/details/42012365
java.lang.IllegalArgumentException: Comparison method violates its general contract!
标签:
原文地址:http://www.cnblogs.com/shouwangzhe-/p/4855479.html