您可以使用org.apache.commons.collections4.CollectionUtils :: emptyIfNull函数:
org.apache.commons.collections4.CollectionUtils.emptyIfNull(list).stream().filter(...);

您可以使用org.apache.commons.collections4.CollectionUtils :: emptyIfNull函数:
org.apache.commons.collections4.CollectionUtils.emptyIfNull(list).stream().filter(...);