mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 18:40: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
|
@ -14,7 +14,6 @@ import java.util.ArrayList;
|
|||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler {
|
||||
|
||||
|
@ -126,11 +125,11 @@ public class DbusReceiveMessageHandler implements Manager.ReceiveMessageHandler
|
|||
.stream()
|
||||
.filter(a -> a.id().isPresent())
|
||||
.map(this::getAttachmentMap)
|
||||
.collect(Collectors.toList());
|
||||
.toList();
|
||||
extras.put("attachments", new Variant<>(attachments, "aa{sv}"));
|
||||
}
|
||||
if (message.mentions().size() > 0) {
|
||||
var mentions = message.mentions().stream().map(this::getMentionMap).collect(Collectors.toList());
|
||||
var mentions = message.mentions().stream().map(this::getMentionMap).toList();
|
||||
extras.put("mentions", new Variant<>(mentions, "aa{sv}"));
|
||||
}
|
||||
extras.put("expiresInSeconds", new Variant<>(message.expiresInSeconds()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue