mirror of
https://gitee.com/dromara/RuoYi-Cloud-Plus.git
synced 2025-12-26 07:26:43 +08:00
fix 修复 StreamUtils 返回不可变类型报错问题
This commit is contained in:
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…
x
Reference in New Issue
Block a user