Fix inspection issues

This commit is contained in:
AsamK 2023-12-15 17:32:30 +01:00
parent fc6a4b78eb
commit caa4fa0180
12 changed files with 12 additions and 15 deletions

View file

@ -220,7 +220,7 @@ public class SendHelper {
(messageSender, address, unidentifiedAccess) -> messageSender.sendTyping(List.of(address),
List.of(unidentifiedAccess),
message,
null).get(0));
null).getFirst());
handleSendMessageResult(result);
return result;
}

View file

@ -302,7 +302,7 @@ public class StorageHelper {
logger.warn("Failed to read storage records, ignoring.");
return null;
}
return !records.isEmpty() ? records.get(0) : null;
return !records.isEmpty() ? records.getFirst() : null;
}
private List<SignalStorageRecord> getSignalStorageRecords(final Collection<StorageId> storageIds) throws IOException {

View file

@ -1291,7 +1291,7 @@ public class ManagerImpl implements Manager {
r -> context.getIdentityHelper().trustIdentityVerifiedSafetyNumber(r, safetyNumber.safetyNumber()));
case IdentityVerificationCode.ScannableSafetyNumber safetyNumber -> trustIdentity(recipient,
r -> context.getIdentityHelper().trustIdentityVerifiedSafetyNumber(r, safetyNumber.safetyNumber()));
case null, default -> throw new AssertionError("Invalid verification code type");
case null -> throw new AssertionError("Invalid verification code type");
};
}