final Pair<RecipientId, Optional<RecipientId>> pair;
synchronized (recipients) {
pair = resolveRecipientLocked(address, isHighTrust);
- if (pair.second().isPresent()) {
- recipientsMerged.put(pair.second().get(), pair.first());
- }
}
if (pair.second().isPresent()) {
logger.debug("Got separate recipients for high trust number and uuid, need to merge them");
updateRecipientAddressLocked(byUuid.get().getRecipientId(), address);
mergeRecipientsLocked(byUuid.get().getRecipientId(), byNumber.get().getRecipientId());
+ recipientsMerged.put(byNumber.get().getRecipientId(), byUuid.get().getRecipientId());
return new Pair<>(byUuid.get().getRecipientId(), byNumber.map(Recipient::getRecipientId));
}