From b32e67ff9ef2b98d30532347ac4e8d6f9f177758 Mon Sep 17 00:00:00 2001 From: Jon Chambers Date: Fri, 15 Nov 2024 15:07:23 -0500 Subject: [PATCH] Resolve minor warnings/suggestions in `AccountsManager` --- .../textsecuregcm/storage/AccountsManager.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/service/src/main/java/org/whispersystems/textsecuregcm/storage/AccountsManager.java b/service/src/main/java/org/whispersystems/textsecuregcm/storage/AccountsManager.java index 53db375dc..b803e6e2f 100644 --- a/service/src/main/java/org/whispersystems/textsecuregcm/storage/AccountsManager.java +++ b/service/src/main/java/org/whispersystems/textsecuregcm/storage/AccountsManager.java @@ -163,8 +163,8 @@ public class AccountsManager extends RedisPubSubAdapter implemen private static final ObjectWriter ACCOUNT_REDIS_JSON_WRITER = SystemMapper.jsonMapper() .writer(SystemMapper.excludingField(Account.class, List.of("uuid"))); - private static Duration MESSAGE_POLL_INTERVAL = Duration.ofSeconds(1); - private static Duration MAX_SERVER_CLOCK_DRIFT = Duration.ofSeconds(5); + private static final Duration MESSAGE_POLL_INTERVAL = Duration.ofSeconds(1); + private static final Duration MAX_SERVER_CLOCK_DRIFT = Duration.ofSeconds(5); // An account that's used at least daily will get reset in the cache at least once per day when its "last seen" // timestamp updates; expiring entries after two days will help clear out "zombie" cache entries that are read @@ -738,7 +738,6 @@ public class AccountsManager extends RedisPubSubAdapter implemen } account.getDevices() - .stream() .forEach(device -> device.setPhoneNumberIdentityRegistrationId(pniRegistrationIds.get(device.getId()))); account.setPhoneNumberIdentityKey(pniIdentityKey);