Add @SuppressWarnings and tweak formatting

This commit is contained in:
Gary Gregory 2022-11-06 10:18:01 -05:00
parent 5286ebe2c6
commit 8618b108f8
1 changed files with 2 additions and 3 deletions

View File

@ -41,6 +41,7 @@ import org.apache.commons.collections4.comparators.TransformingComparator;
*/ */
public class ComparatorUtils { public class ComparatorUtils {
@SuppressWarnings("rawtypes")
private static final Comparator[] EMPTY_COMPARATOR_ARRAY = {}; private static final Comparator[] EMPTY_COMPARATOR_ARRAY = {};
/** /**
@ -99,9 +100,7 @@ public class ComparatorUtils {
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public static <E> Comparator<E> chainedComparator(final Collection<Comparator<E>> comparators) { public static <E> Comparator<E> chainedComparator(final Collection<Comparator<E>> comparators) {
return chainedComparator( return chainedComparator(comparators.toArray(EMPTY_COMPARATOR_ARRAY));
comparators.toArray(EMPTY_COMPARATOR_ARRAY)
);
} }
/** /**