fix 修复 StreamUtils 返回不可变类型报错问题

dev
疯狂的狮子Li 4 months ago
parent 9439ec88ab
commit 8c315c0c4d

@ -287,7 +287,7 @@ public class StreamUtils {
*/
public static <E, T> Set<T> toSet(Collection<E> collection, Function<E, T> function) {
if (CollUtil.isEmpty(collection)) {
return Collections.emptySet();
return CollUtil.newHashSet();
}
return collection.stream()
.map(function)

Loading…
Cancel
Save