Skip to content

Commit

Permalink
#11687 replace collect(Collectors.toList()) with toList()
Browse files Browse the repository at this point in the history
Signed-off-by: Ludovic Orban <[email protected]>
  • Loading branch information
lorban committed Apr 23, 2024
1 parent 0b9f447 commit c9a7afe
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ default Mutable put(String name, long value)
default Mutable computeField(HttpHeader header, BiFunction<HttpHeader, List<HttpField>, HttpField> computeFn)
{
Objects.requireNonNull(header);
HttpField result = computeFn.apply(header, stream().filter(f -> f.getHeader() == header).collect(Collectors.toList()));
HttpField result = computeFn.apply(header, stream().filter(f -> f.getHeader() == header).toList());
return result != null ? put(result) : remove(header);
}

Expand All @@ -1401,7 +1401,7 @@ default Mutable computeField(HttpHeader header, BiFunction<HttpHeader, List<Http
default Mutable computeField(String name, BiFunction<String, List<HttpField>, HttpField> computeFn)
{
Objects.requireNonNull(name);
HttpField result = computeFn.apply(name, stream().filter(f -> f.is(name)).collect(Collectors.toList()));
HttpField result = computeFn.apply(name, stream().filter(f -> f.is(name)).toList());
return result != null ? put(result) : remove(name);
}

Expand Down

0 comments on commit c9a7afe

Please sign in to comment.