Replace collect(Collectors.toList()) with toList()

This commit is contained in:
AsamK 2021-12-11 13:10:39 +01:00
parent 06e93b84da
commit 62687d103f
41 changed files with 106 additions and 199 deletions

View file

@ -28,7 +28,6 @@ import org.slf4j.LoggerFactory;
import java.io.File;
import java.io.IOException;
import java.util.HashMap;
import java.util.stream.Collectors;
import java.util.stream.Stream;
public class UpdateGroupCommand implements JsonRpcLocalCommand {
@ -160,8 +159,7 @@ public class UpdateGroupCommand implements JsonRpcLocalCommand {
groupMessageResults = results;
} else {
groupMessageResults = new SendGroupMessageResults(results.timestamp(),
Stream.concat(groupMessageResults.results().stream(), results.results().stream())
.collect(Collectors.toList()));
Stream.concat(groupMessageResults.results().stream(), results.results().stream()).toList());
}
}
outputResult(outputWriter, groupMessageResults, isNewGroup ? groupId : null);