Does sorting by a non transitive comparator “work”?-Collection of common programming errors
The Collections.sort() is based on a mergesort.
a mergesort has a O(logn) iterations overall, because the array size is ALWAYS divided, so the sort() should end, regardless the Comparator is not not transitive, so infinite loop won’t occur.
Though, there are no guarantees on the resulted List’s order.