Hi,

this PR avoids some unnecessary sorting overhead (e.g. if the collection is too small) for methods that are repeatably called and where collection sizes of <= 1 are fairly common (e.g. for the ProducesRequestCondition).

Cheers, Christoph

Comment From: rstoyanchev

Thanks for the changes. It's a shame this check isn't in Collections#sort or List#sort.

Comment From: dreis2211

Indeed