Skip to content

Commit

Permalink
Replace Collections.singletonList with List.of
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit committed Oct 8, 2023
1 parent 9d98246 commit deffb99
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static <T> Stream<List<T>> partitioned(List<T> list, int numberOfParts) {
private static <T> Stream<List<T>> asSingletonListStream(List<T> list) {
Stream.Builder<List<T>> acc = Stream.builder();
for (T t : list) {
acc.add(Collections.singletonList(t));
acc.add(List.of(t));
}
return acc.build();
}
Expand Down

0 comments on commit deffb99

Please sign in to comment.