question: public static void sortList ( List list , Comparator comparator ) { if ( SystemUtils . IS_JAVA_1_7 && list instanceof CopyOnWriteArrayList ) { List tempList = new ArrayList ( list ) ; Collections . sort ( tempList , comparator ) ; list . clear ( ) ; list . addAll ( tempList ) ; } else { Collections . sort ( list , comparator ) ; } }
target:  Sorts the list. Since CopyOnWriteArrayLists are not sortable with Java7, we need this wrapper to sort it differently on Java7.