newList = newList.stream().collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(Annex :: getOrigSysId))), ArrayList::new));