public static <K, U, T> Map<K, U> toMap(final Collection<T> list, final Function<? super T, ? extends K> keyMapper, final Function<? super T, ? extends U> valueMapper) {
        if (CollectionUtils.isEmpty(list)) {
            return Collections.emptyMap();
        }
        return list.stream()
                .filter(Objects::nonNull)
                .collect(Collectors.toMap(keyMapper, valueMapper, (value1, value2) -> value1));
    }
list to map.<br>
if element is null it filters.

@param list        list
@param keyMapper   map key convert
@param valueMapper map value convert
@param <K>         map key type
@param <U>         map value type
@param <T>         list value type
@return list
shenyu-common/src/main/java/org/apache/shenyu/common/utils/ListUtil.java