Resolve a warning about potentially-null results from a Flux#toList call

This commit is contained in:
Jon Chambers
2026-01-13 16:03:11 -05:00
committed by Chris Eager
parent 14e7652339
commit 4b1a0259fc

View File

@@ -38,6 +38,7 @@ import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.time.Clock;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
import java.util.UUID;
@@ -384,7 +385,8 @@ public class KeysController {
devicePreKeys.ecPreKey().orElse(null),
devicePreKeys.kemSignedPreKey())))
.collectList()
.block();
.blockOptional()
.orElseGet(Collections::emptyList);
final IdentityKey identityKey = target.getIdentityKey(targetIdentifier.identityType());