Update hutool-core/src/main/java/org/dromara/hutool/core/collection/CollUtil.java

This commit is contained in:
emptypoint 2023-07-01 07:27:57 +00:00 committed by Gitee
parent 8e46171695
commit ef166b6201
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -2378,8 +2378,7 @@ public class CollUtil {
*/
@SuppressWarnings({"unchecked"})
public static List<Object> flat(Collection<?> collection, boolean skipNull) {
LinkedList queue = EasyStream.of(collection)
.collect(Collectors.toCollection(LinkedList::new));
LinkedList<Object> queue = new LinkedList<>(collection);
List<Object> result = new ArrayList<>();