diff --git a/lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java b/lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java index e0f2f161..523df2c9 100644 --- a/lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java +++ b/lib/src/main/java/org/asamk/signal/manager/helper/SendHelper.java @@ -51,7 +51,6 @@ import java.util.Optional; import java.util.Set; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicLong; -import java.util.stream.Collectors; public class SendHelper { @@ -275,7 +274,7 @@ public class SendHelper { .getDevices() .stream() .map(device -> new SignalProtocolAddress(address.getIdentifier(), device)) - .collect(Collectors.toList()); + .toList(); account.getSenderKeyStore().markSenderKeySharedWith(group.getDistributionId(), addresses); } @@ -536,14 +535,14 @@ public class SendHelper { List addresses = recipientIdList.stream() .map(context.getRecipientHelper()::resolveSignalServiceAddress) - .collect(Collectors.toList()); + .toList(); List unidentifiedAccesses = context.getUnidentifiedAccessHelper() .getAccessFor(recipientIdList) .stream() .map(Optional::get) .map(UnidentifiedAccessPair::getTargetUnidentifiedAccess) .map(Optional::get) - .collect(Collectors.toList()); + .toList(); try { List results = sender.send(distributionId,