public static <R, T> List<T> map(final Collection<R> list, final Function<? super R, ? extends T> function) {
        if (CollectionUtils.isEmpty(list)) {
            return Collections.emptyList();
        }
        return list.stream()
                .filter(Objects::nonNull)
                .map(function)
                .collect(Collectors.toList());
    }
list map.<br>
if element is null it filter.

@param list     list
@param function map fun
@param <R>      resource type
@param <T>      target type
@return list
shenyu-common/src/main/java/org/apache/shenyu/common/utils/ListUtil.java