public static <T> List<T> union(List<T> list1, List<T> list2) {
        int size1 = list1.size();
        int size2 = list2.size();
        if (size1 == 0) {
            return list2;
        } else if (size2 == 0) {
            return list1;
        }
        ArrayList<T> result = new ArrayList<>(size1 + size2);
        result.addAll(list1);
        result.addAll(list2);
        return result;
    }
Note that the method only checks the immutable classes used by Turms.
turms-server-common/src/main/java/im/turms/server/common/infra/collection/CollectionUtil.java