mirror of
				https://github.com/dromara/RuoYi-Vue-Plus.git
				synced 2025-11-04 16:23:42 +08:00 
			
		
		
		
	fix 修复 StreamUtils 返回不可变类型报错问题
This commit is contained in:
		@@ -27,7 +27,7 @@ public class StreamUtils {
 | 
			
		||||
     */
 | 
			
		||||
    public static <E> List<E> filter(Collection<E> collection, Predicate<E> function) {
 | 
			
		||||
        if (CollUtil.isEmpty(collection)) {
 | 
			
		||||
            return Collections.emptyList();
 | 
			
		||||
            return CollUtil.newArrayList();
 | 
			
		||||
        }
 | 
			
		||||
        return collection.stream()
 | 
			
		||||
            .filter(function)
 | 
			
		||||
@@ -127,7 +127,7 @@ public class StreamUtils {
 | 
			
		||||
     */
 | 
			
		||||
    public static <E> List<E> sorted(Collection<E> collection, Comparator<E> comparing) {
 | 
			
		||||
        if (CollUtil.isEmpty(collection)) {
 | 
			
		||||
            return Collections.emptyList();
 | 
			
		||||
            return CollUtil.newArrayList();
 | 
			
		||||
        }
 | 
			
		||||
        return collection.stream()
 | 
			
		||||
            .filter(Objects::nonNull)
 | 
			
		||||
@@ -265,7 +265,7 @@ public class StreamUtils {
 | 
			
		||||
     */
 | 
			
		||||
    public static <E, T> List<T> toList(Collection<E> collection, Function<E, T> function) {
 | 
			
		||||
        if (CollUtil.isEmpty(collection)) {
 | 
			
		||||
            return Collections.emptyList();
 | 
			
		||||
            return CollUtil.newArrayList();
 | 
			
		||||
        }
 | 
			
		||||
        return collection.stream()
 | 
			
		||||
            .map(function)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user