mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-30 02:50:39 +00:00
Replace collect(Collectors.toList()) with toList()
This commit is contained in:
parent
06e93b84da
commit
62687d103f
41 changed files with 106 additions and 199 deletions
|
@ -15,7 +15,6 @@ import java.io.IOException;
|
|||
import java.util.Objects;
|
||||
import java.util.function.Consumer;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.StreamSupport;
|
||||
|
||||
public class JsonRpcReader {
|
||||
|
@ -57,7 +56,7 @@ public class JsonRpcReader {
|
|||
}
|
||||
|
||||
return handleRequest(requestHandler, request);
|
||||
}).filter(Objects::nonNull).collect(Collectors.toList());
|
||||
}).filter(Objects::nonNull).toList();
|
||||
|
||||
jsonRpcSender.sendBatchResponses(responseList);
|
||||
}
|
||||
|
@ -128,8 +127,7 @@ public class JsonRpcReader {
|
|||
null), null));
|
||||
return null;
|
||||
}
|
||||
return new JsonRpcBatchMessage(StreamSupport.stream(jsonNode.spliterator(), false)
|
||||
.collect(Collectors.toList()));
|
||||
return new JsonRpcBatchMessage(StreamSupport.stream(jsonNode.spliterator(), false).toList());
|
||||
} else if (jsonNode.isObject()) {
|
||||
if (jsonNode.has("result") || jsonNode.has("error")) {
|
||||
return parseJsonRpcResponse(jsonNode);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue