diff --git a/src/main/java/com/pivovarit/collectors/BatchingSpliterator.java b/src/main/java/com/pivovarit/collectors/BatchingSpliterator.java index f99005c6..7239f613 100644 --- a/src/main/java/com/pivovarit/collectors/BatchingSpliterator.java +++ b/src/main/java/com/pivovarit/collectors/BatchingSpliterator.java @@ -51,7 +51,7 @@ static Stream> partitioned(List list, int numberOfParts) { private static Stream> asSingletonListStream(List list) { Stream.Builder> acc = Stream.builder(); for (T t : list) { - acc.add(Collections.singletonList(t)); + acc.add(List.of(t)); } return acc.build(); }