Collection.sort() 报错解决:Comparison method violates its general contract!

Collections.sort()和Arrays.sort()排序算法选择

Timsort原理介绍