Reorder static final modifier

This commit is contained in:
AsamK 2023-11-10 14:03:13 +01:00
parent b20978e08e
commit c0aa338d7c
91 changed files with 137 additions and 137 deletions

View file

@ -112,7 +112,7 @@ public final class GroupInviteLinkUrl {
return password;
}
public final static class InvalidGroupLinkException extends Exception {
public static final class InvalidGroupLinkException extends Exception {
public InvalidGroupLinkException(String message) {
super(message);
@ -123,7 +123,7 @@ public final class GroupInviteLinkUrl {
}
}
public final static class UnknownGroupLinkVersionException extends Exception {
public static final class UnknownGroupLinkVersionException extends Exception {
public UnknownGroupLinkVersionException(String message) {
super(message);

View file

@ -59,7 +59,7 @@ public record StickerPackUrl(StickerPackId packId, byte[] packKey) {
}
}
public final static class InvalidStickerPackLinkException extends Exception {
public static final class InvalidStickerPackLinkException extends Exception {
public InvalidStickerPackLinkException(String message) {
super(message);

View file

@ -22,25 +22,25 @@ import okhttp3.Interceptor;
class LiveConfig {
private final static byte[] UNIDENTIFIED_SENDER_TRUST_ROOT = Base64.getDecoder()
private static final byte[] UNIDENTIFIED_SENDER_TRUST_ROOT = Base64.getDecoder()
.decode("BXu6QIKVz5MA8gstzfOgRQGqyLqOwNKHL6INkv3IHWMF");
private final static String CDSI_MRENCLAVE = "0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57";
private final static String SVR2_MRENCLAVE = "6ee1042f9e20f880326686dd4ba50c25359f01e9f733eeba4382bca001d45094";
private static final String CDSI_MRENCLAVE = "0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57";
private static final String SVR2_MRENCLAVE = "6ee1042f9e20f880326686dd4ba50c25359f01e9f733eeba4382bca001d45094";
private final static String URL = "https://chat.signal.org";
private final static String CDN_URL = "https://cdn.signal.org";
private final static String CDN2_URL = "https://cdn2.signal.org";
private final static String STORAGE_URL = "https://storage.signal.org";
private final static String SIGNAL_CDSI_URL = "https://cdsi.signal.org";
private final static String SIGNAL_SVR2_URL = "https://svr2.signal.org";
private final static TrustStore TRUST_STORE = new WhisperTrustStore();
private static final String URL = "https://chat.signal.org";
private static final String CDN_URL = "https://cdn.signal.org";
private static final String CDN2_URL = "https://cdn2.signal.org";
private static final String STORAGE_URL = "https://storage.signal.org";
private static final String SIGNAL_CDSI_URL = "https://cdsi.signal.org";
private static final String SIGNAL_SVR2_URL = "https://svr2.signal.org";
private static final TrustStore TRUST_STORE = new WhisperTrustStore();
private final static Optional<Dns> dns = Optional.empty();
private final static Optional<SignalProxy> proxy = Optional.empty();
private static final Optional<Dns> dns = Optional.empty();
private static final Optional<SignalProxy> proxy = Optional.empty();
private final static byte[] zkGroupServerPublicParams = Base64.getDecoder()
private static final byte[] zkGroupServerPublicParams = Base64.getDecoder()
.decode("AMhf5ywVwITZMsff/eCyudZx9JDmkkkbV6PInzG4p8x3VqVJSFiMvnvlEKWuRob/1eaIetR31IYeAbm0NdOuHH8Qi+Rexi1wLlpzIo1gstHWBfZzy1+qHRV5A4TqPp15YzBPm0WSggW6PbSn+F4lf57VCnHF7p8SvzAA2ZZJPYJURt8X7bbg+H3i+PEjH9DXItNEqs2sNcug37xZQDLm7X36nOoGPs54XsEGzPdEV+itQNGUFEjY6X9Uv+Acuks7NpyGvCoKxGwgKgE5XyJ+nNKlyHHOLb6N1NuHyBrZrgtY/JYJHRooo5CEqYKBqdFnmbTVGEkCvJKxLnjwKWf+fEPoWeQFj5ObDjcKMZf2Jm2Ae69x+ikU5gBXsRmoF94GXTLfN0/vLt98KDPnxwAQL9j5V1jGOY8jQl6MLxEs56cwXN0dqCnImzVH3TZT1cJ8SW1BRX6qIVxEzjsSGx3yxF3suAilPMqGRp4ffyopjMD1JXiKR2RwLKzizUe5e8XyGOy9fplzhw3jVzTRyUZTRSZKkMLWcQ/gv0E4aONNqs4P");
private final static byte[] genericServerPublicParams = Base64.getDecoder()
private static final byte[] genericServerPublicParams = Base64.getDecoder()
.decode("AByD873dTilmOSG0TjKrvpeaKEsUmIO8Vx9BeMmftwUs9v7ikPwM8P3OHyT0+X3EUMZrSe9VUp26Wai51Q9I8mdk0hX/yo7CeFGJyzoOqn8e/i4Ygbn5HoAyXJx5eXfIbqpc0bIxzju4H/HOQeOpt6h742qii5u/cbwOhFZCsMIbElZTaeU+BWMBQiZHIGHT5IE0qCordQKZ5iPZom0HeFa8Yq0ShuEyAl0WINBiY6xE3H/9WnvzXBbMuuk//eRxXgzO8ieCeK8FwQNxbfXqZm6Ro1cMhCOF3u7xoX83QhpN");
static SignalServiceConfiguration createDefaultServiceConfiguration(

View file

@ -11,19 +11,19 @@ import okhttp3.Interceptor;
public class ServiceConfig {
public final static int PREKEY_MINIMUM_COUNT = 10;
public final static int PREKEY_BATCH_SIZE = 100;
public final static int PREKEY_MAXIMUM_ID = Medium.MAX_VALUE;
public static final int PREKEY_MINIMUM_COUNT = 10;
public static final int PREKEY_BATCH_SIZE = 100;
public static final int PREKEY_MAXIMUM_ID = Medium.MAX_VALUE;
public static final long PREKEY_ARCHIVE_AGE = TimeUnit.DAYS.toMillis(30);
public static final long PREKEY_STALE_AGE = TimeUnit.DAYS.toMillis(90);
public static final long SIGNED_PREKEY_ROTATE_AGE = TimeUnit.DAYS.toMillis(2);
public final static int MAX_ATTACHMENT_SIZE = 150 * 1024 * 1024;
public final static long MAX_ENVELOPE_SIZE = 0;
public final static long AVATAR_DOWNLOAD_FAILSAFE_MAX_SIZE = 10 * 1024 * 1024;
public final static boolean AUTOMATIC_NETWORK_RETRY = true;
public final static int GROUP_MAX_SIZE = 1001;
public final static int MAXIMUM_ONE_OFF_REQUEST_SIZE = 3;
public static final int MAX_ATTACHMENT_SIZE = 150 * 1024 * 1024;
public static final long MAX_ENVELOPE_SIZE = 0;
public static final long AVATAR_DOWNLOAD_FAILSAFE_MAX_SIZE = 10 * 1024 * 1024;
public static final boolean AUTOMATIC_NETWORK_RETRY = true;
public static final int GROUP_MAX_SIZE = 1001;
public static final int MAXIMUM_ONE_OFF_REQUEST_SIZE = 3;
public static AccountAttributes.Capabilities getCapabilities(boolean isPrimaryDevice) {
final var giftBadges = !isPrimaryDevice;

View file

@ -22,25 +22,25 @@ import okhttp3.Interceptor;
class StagingConfig {
private final static byte[] UNIDENTIFIED_SENDER_TRUST_ROOT = Base64.getDecoder()
private static final byte[] UNIDENTIFIED_SENDER_TRUST_ROOT = Base64.getDecoder()
.decode("BbqY1DzohE4NUZoVF+L18oUPrK3kILllLEJh2UnPSsEx");
private final static String CDSI_MRENCLAVE = "0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57";
private final static String SVR2_MRENCLAVE = "a8a261420a6bb9b61aa25bf8a79e8bd20d7652531feb3381cbffd446d270be95";
private static final String CDSI_MRENCLAVE = "0f6fd79cdfdaa5b2e6337f534d3baf999318b0c462a7ac1f41297a3e4b424a57";
private static final String SVR2_MRENCLAVE = "a8a261420a6bb9b61aa25bf8a79e8bd20d7652531feb3381cbffd446d270be95";
private final static String URL = "https://chat.staging.signal.org";
private final static String CDN_URL = "https://cdn-staging.signal.org";
private final static String CDN2_URL = "https://cdn2-staging.signal.org";
private final static String STORAGE_URL = "https://storage-staging.signal.org";
private final static String SIGNAL_CDSI_URL = "https://cdsi.staging.signal.org";
private final static String SIGNAL_SVR2_URL = "https://svr2.staging.signal.org";
private final static TrustStore TRUST_STORE = new WhisperTrustStore();
private static final String URL = "https://chat.staging.signal.org";
private static final String CDN_URL = "https://cdn-staging.signal.org";
private static final String CDN2_URL = "https://cdn2-staging.signal.org";
private static final String STORAGE_URL = "https://storage-staging.signal.org";
private static final String SIGNAL_CDSI_URL = "https://cdsi.staging.signal.org";
private static final String SIGNAL_SVR2_URL = "https://svr2.staging.signal.org";
private static final TrustStore TRUST_STORE = new WhisperTrustStore();
private final static Optional<Dns> dns = Optional.empty();
private final static Optional<SignalProxy> proxy = Optional.empty();
private static final Optional<Dns> dns = Optional.empty();
private static final Optional<SignalProxy> proxy = Optional.empty();
private final static byte[] zkGroupServerPublicParams = Base64.getDecoder()
private static final byte[] zkGroupServerPublicParams = Base64.getDecoder()
.decode("ABSY21VckQcbSXVNCGRYJcfWHiAMZmpTtTELcDmxgdFbtp/bWsSxZdMKzfCp8rvIs8ocCU3B37fT3r4Mi5qAemeGeR2X+/YmOGR5ofui7tD5mDQfstAI9i+4WpMtIe8KC3wU5w3Inq3uNWVmoGtpKndsNfwJrCg0Hd9zmObhypUnSkfYn2ooMOOnBpfdanRtrvetZUayDMSC5iSRcXKpdlukrpzzsCIvEwjwQlJYVPOQPj4V0F4UXXBdHSLK05uoPBCQG8G9rYIGedYsClJXnbrgGYG3eMTG5hnx4X4ntARBgELuMWWUEEfSK0mjXg+/2lPmWcTZWR9nkqgQQP0tbzuiPm74H2wMO4u1Wafe+UwyIlIT9L7KLS19Aw8r4sPrXZSSsOZ6s7M1+rTJN0bI5CKY2PX29y5Ok3jSWufIKcgKOnWoP67d5b2du2ZVJjpjfibNIHbT/cegy/sBLoFwtHogVYUewANUAXIaMPyCLRArsKhfJ5wBtTminG/PAvuBdJ70Z/bXVPf8TVsR292zQ65xwvWTejROW6AZX6aqucUj");
private final static byte[] genericServerPublicParams = Base64.getDecoder()
private static final byte[] genericServerPublicParams = Base64.getDecoder()
.decode("AHILOIrFPXX9laLbalbA9+L1CXpSbM/bTJXZGZiuyK1JaI6dK5FHHWL6tWxmHKYAZTSYmElmJ5z2A5YcirjO/yfoemE03FItyaf8W1fE4p14hzb5qnrmfXUSiAIVrhaXVwIwSzH6RL/+EO8jFIjJ/YfExfJ8aBl48CKHgu1+A6kWynhttonvWWx6h7924mIzW0Czj2ROuh4LwQyZypex4GuOPW8sgIT21KNZaafgg+KbV7XM1x1tF3XA17B4uGUaDbDw2O+nR1+U5p6qHPzmJ7ggFjSN6Utu+35dS1sS0P9N");
static SignalServiceConfiguration createDefaultServiceConfiguration(

View file

@ -54,7 +54,7 @@ import static org.whispersystems.signalservice.internal.util.Util.isEmpty;
public class AccountHelper {
private final static Logger logger = LoggerFactory.getLogger(AccountHelper.class);
private static final Logger logger = LoggerFactory.getLogger(AccountHelper.class);
private final Context context;
private final SignalAccount account;

View file

@ -25,7 +25,7 @@ import java.util.List;
public class AttachmentHelper {
private final static Logger logger = LoggerFactory.getLogger(AttachmentHelper.class);
private static final Logger logger = LoggerFactory.getLogger(AttachmentHelper.class);
private final SignalDependencies dependencies;
private final AttachmentStore attachmentStore;

View file

@ -62,7 +62,7 @@ import java.util.Set;
public class GroupHelper {
private final static Logger logger = LoggerFactory.getLogger(GroupHelper.class);
private static final Logger logger = LoggerFactory.getLogger(GroupHelper.class);
private final SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -59,7 +59,7 @@ import okio.ByteString;
class GroupV2Helper {
private final static Logger logger = LoggerFactory.getLogger(GroupV2Helper.class);
private static final Logger logger = LoggerFactory.getLogger(GroupV2Helper.class);
private final SignalDependencies dependencies;
private final Context context;

View file

@ -19,7 +19,7 @@ import java.util.function.BiFunction;
public class IdentityHelper {
private final static Logger logger = LoggerFactory.getLogger(IdentityHelper.class);
private static final Logger logger = LoggerFactory.getLogger(IdentityHelper.class);
private final SignalAccount account;
private final Context context;

View file

@ -75,7 +75,7 @@ import java.util.stream.Collectors;
public final class IncomingMessageHandler {
private final static Logger logger = LoggerFactory.getLogger(IncomingMessageHandler.class);
private static final Logger logger = LoggerFactory.getLogger(IncomingMessageHandler.class);
private final SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -13,7 +13,7 @@ import java.io.IOException;
public class PinHelper {
private final static Logger logger = LoggerFactory.getLogger(PinHelper.class);
private static final Logger logger = LoggerFactory.getLogger(PinHelper.class);
private final SecureValueRecoveryV2 secureValueRecoveryV2;

View file

@ -24,7 +24,7 @@ import static org.asamk.signal.manager.config.ServiceConfig.SIGNED_PREKEY_ROTATE
public class PreKeyHelper {
private final static Logger logger = LoggerFactory.getLogger(PreKeyHelper.class);
private static final Logger logger = LoggerFactory.getLogger(PreKeyHelper.class);
private final SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -47,7 +47,7 @@ import io.reactivex.rxjava3.core.Single;
public final class ProfileHelper {
private final static Logger logger = LoggerFactory.getLogger(ProfileHelper.class);
private static final Logger logger = LoggerFactory.getLogger(ProfileHelper.class);
private final SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -31,8 +31,8 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
public class ReceiveHelper {
private final static Logger logger = LoggerFactory.getLogger(ReceiveHelper.class);
private final static int MAX_BACKOFF_COUNTER = 9;
private static final Logger logger = LoggerFactory.getLogger(ReceiveHelper.class);
private static final int MAX_BACKOFF_COUNTER = 9;
private final SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -29,7 +29,7 @@ import static org.asamk.signal.manager.config.ServiceConfig.MAXIMUM_ONE_OFF_REQU
public class RecipientHelper {
private final static Logger logger = LoggerFactory.getLogger(RecipientHelper.class);
private static final Logger logger = LoggerFactory.getLogger(RecipientHelper.class);
private final SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -56,7 +56,7 @@ import okio.ByteString;
public class SendHelper {
private final static Logger logger = LoggerFactory.getLogger(SendHelper.class);
private static final Logger logger = LoggerFactory.getLogger(SendHelper.class);
private final SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -17,7 +17,7 @@ import java.util.HashSet;
public class StickerHelper {
private final static Logger logger = LoggerFactory.getLogger(StickerHelper.class);
private static final Logger logger = LoggerFactory.getLogger(StickerHelper.class);
private final Context context;
private final SignalAccount account;

View file

@ -31,7 +31,7 @@ import java.util.stream.Collectors;
public class StorageHelper {
private final static Logger logger = LoggerFactory.getLogger(StorageHelper.class);
private static final Logger logger = LoggerFactory.getLogger(StorageHelper.class);
private final SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -47,7 +47,7 @@ import java.util.stream.Stream;
public class SyncHelper {
private final static Logger logger = LoggerFactory.getLogger(SyncHelper.class);
private static final Logger logger = LoggerFactory.getLogger(SyncHelper.class);
private final Context context;
private final SignalAccount account;

View file

@ -20,8 +20,8 @@ import java.util.concurrent.TimeUnit;
public class UnidentifiedAccessHelper {
private final static Logger logger = LoggerFactory.getLogger(UnidentifiedAccessHelper.class);
private final static long CERTIFICATE_EXPIRATION_BUFFER = TimeUnit.DAYS.toMillis(1);
private static final Logger logger = LoggerFactory.getLogger(UnidentifiedAccessHelper.class);
private static final long CERTIFICATE_EXPIRATION_BUFFER = TimeUnit.DAYS.toMillis(1);
private static final byte[] UNRESTRICTED_KEY = new byte[16];
private final SignalAccount account;

View file

@ -7,7 +7,7 @@ import org.slf4j.LoggerFactory;
public class LibSignalLogger implements SignalProtocolLogger {
private final static Logger logger = LoggerFactory.getLogger("LibSignal");
private static final Logger logger = LoggerFactory.getLogger("LibSignal");
public static void initLogger() {
SignalProtocolLoggerProvider.setProvider(new LibSignalLogger());

View file

@ -126,7 +126,7 @@ import io.reactivex.rxjava3.disposables.CompositeDisposable;
public class ManagerImpl implements Manager {
private final static Logger logger = LoggerFactory.getLogger(ManagerImpl.class);
private static final Logger logger = LoggerFactory.getLogger(ManagerImpl.class);
private SignalAccount account;
private final SignalDependencies dependencies;

View file

@ -22,7 +22,7 @@ import java.util.function.Consumer;
public class MultiAccountManagerImpl implements MultiAccountManager {
private final static Logger logger = LoggerFactory.getLogger(MultiAccountManagerImpl.class);
private static final Logger logger = LoggerFactory.getLogger(MultiAccountManagerImpl.class);
private final Set<Consumer<Manager>> onManagerAddedHandlers = new HashSet<>();
private final Set<Consumer<Manager>> onManagerRemovedHandlers = new HashSet<>();

View file

@ -49,7 +49,7 @@ import static org.asamk.signal.manager.config.ServiceConfig.getCapabilities;
public class ProvisioningManagerImpl implements ProvisioningManager {
private final static Logger logger = LoggerFactory.getLogger(ProvisioningManagerImpl.class);
private static final Logger logger = LoggerFactory.getLogger(ProvisioningManagerImpl.class);
private final PathConfig pathConfig;
private final ServiceEnvironmentConfig serviceEnvironmentConfig;

View file

@ -53,7 +53,7 @@ import java.util.function.Consumer;
public class RegistrationManagerImpl implements RegistrationManager {
private final static Logger logger = LoggerFactory.getLogger(RegistrationManagerImpl.class);
private static final Logger logger = LoggerFactory.getLogger(RegistrationManagerImpl.class);
private SignalAccount account;
private final PathConfig pathConfig;

View file

@ -23,7 +23,7 @@ import io.reactivex.rxjava3.schedulers.Schedulers;
*/
final class SignalWebSocketHealthMonitor implements HealthMonitor {
private final static Logger logger = LoggerFactory.getLogger(SignalWebSocketHealthMonitor.class);
private static final Logger logger = LoggerFactory.getLogger(SignalWebSocketHealthMonitor.class);
private static final long KEEP_ALIVE_SEND_CADENCE = TimeUnit.SECONDS.toMillis(WebSocketConnection.KEEPALIVE_FREQUENCY_SECONDS);
private static final long MAX_TIME_SINCE_SUCCESSFUL_KEEP_ALIVE = KEEP_ALIVE_SEND_CADENCE * 3;
@ -157,7 +157,7 @@ final class SignalWebSocketHealthMonitor implements HealthMonitor {
}
}
private final static class HttpErrorTracker {
private static final class HttpErrorTracker {
private final long[] timestamps;
private final long errorTimeRange;

View file

@ -11,7 +11,7 @@ import java.io.IOException;
public class RetrieveStickerPackJob implements Job {
private final static Logger logger = LoggerFactory.getLogger(RetrieveStickerPackJob.class);
private static final Logger logger = LoggerFactory.getLogger(RetrieveStickerPackJob.class);
private final StickerPackId packId;
private final byte[] packKey;

View file

@ -31,7 +31,7 @@ import java.util.UUID;
public class AccountDatabase extends Database {
private final static Logger logger = LoggerFactory.getLogger(AccountDatabase.class);
private static final Logger logger = LoggerFactory.getLogger(AccountDatabase.class);
private static final long DATABASE_VERSION = 18;
private AccountDatabase(final HikariDataSource dataSource) {

View file

@ -109,7 +109,7 @@ import static org.asamk.signal.manager.config.ServiceConfig.getCapabilities;
public class SignalAccount implements Closeable {
private final static Logger logger = LoggerFactory.getLogger(SignalAccount.class);
private static final Logger logger = LoggerFactory.getLogger(SignalAccount.class);
private static final int MINIMUM_STORAGE_VERSION = 1;
private static final int CURRENT_STORAGE_VERSION = 8;

View file

@ -33,7 +33,7 @@ public class AccountsStore {
private static final int MINIMUM_STORAGE_VERSION = 1;
private static final int CURRENT_STORAGE_VERSION = 2;
private final static Logger logger = LoggerFactory.getLogger(AccountsStore.class);
private static final Logger logger = LoggerFactory.getLogger(AccountsStore.class);
private final ObjectMapper objectMapper = Utils.createStorageObjectMapper();
private final File dataPath;

View file

@ -32,7 +32,7 @@ import java.util.stream.Stream;
public class GroupStore {
private final static Logger logger = LoggerFactory.getLogger(GroupStore.class);
private static final Logger logger = LoggerFactory.getLogger(GroupStore.class);
private static final String TABLE_GROUP_V2 = "group_v2";
private static final String TABLE_GROUP_V1 = "group_v1";
private static final String TABLE_GROUP_V1_MEMBER = "group_v1_member";

View file

@ -33,7 +33,7 @@ import java.util.stream.Collectors;
public class LegacyGroupStore {
private final static Logger logger = LoggerFactory.getLogger(LegacyGroupStore.class);
private static final Logger logger = LoggerFactory.getLogger(LegacyGroupStore.class);
public static void migrate(
final Storage storage,

View file

@ -23,7 +23,7 @@ import io.reactivex.rxjava3.subjects.PublishSubject;
public class IdentityKeyStore {
private final static Logger logger = LoggerFactory.getLogger(IdentityKeyStore.class);
private static final Logger logger = LoggerFactory.getLogger(IdentityKeyStore.class);
private static final String TABLE_IDENTITY = "identity";
private final Database database;
private final TrustNewIdentity trustNewIdentity;

View file

@ -24,7 +24,7 @@ import java.util.regex.Pattern;
public class LegacyIdentityKeyStore {
private final static Logger logger = LoggerFactory.getLogger(LegacyIdentityKeyStore.class);
private static final Logger logger = LoggerFactory.getLogger(LegacyIdentityKeyStore.class);
private static final ObjectMapper objectMapper = org.asamk.signal.manager.storage.Utils.createStorageObjectMapper();
public static void migrate(

View file

@ -14,7 +14,7 @@ import java.sql.Types;
public class KeyValueStore {
private static final String TABLE_KEY_VALUE = "key_value";
private final static Logger logger = LoggerFactory.getLogger(KeyValueStore.class);
private static final Logger logger = LoggerFactory.getLogger(KeyValueStore.class);
private final Database database;

View file

@ -11,7 +11,7 @@ import java.nio.file.Files;
public final class CachedMessage {
private final static Logger logger = LoggerFactory.getLogger(CachedMessage.class);
private static final Logger logger = LoggerFactory.getLogger(CachedMessage.class);
private final File file;

View file

@ -17,7 +17,7 @@ import java.util.stream.Stream;
public class MessageCache {
private final static Logger logger = LoggerFactory.getLogger(MessageCache.class);
private static final Logger logger = LoggerFactory.getLogger(MessageCache.class);
private final File messageCachePath;

View file

@ -20,7 +20,7 @@ import static org.asamk.signal.manager.config.ServiceConfig.PREKEY_ARCHIVE_AGE;
public class KyberPreKeyStore implements SignalServiceKyberPreKeyStore {
private static final String TABLE_KYBER_PRE_KEY = "kyber_pre_key";
private final static Logger logger = LoggerFactory.getLogger(KyberPreKeyStore.class);
private static final Logger logger = LoggerFactory.getLogger(KyberPreKeyStore.class);
private final Database database;
private final int accountIdType;

View file

@ -14,7 +14,7 @@ import java.util.regex.Pattern;
public class LegacyPreKeyStore {
private final static Logger logger = LoggerFactory.getLogger(LegacyPreKeyStore.class);
private static final Logger logger = LoggerFactory.getLogger(LegacyPreKeyStore.class);
static final Pattern preKeyFileNamePattern = Pattern.compile("(\\d+)");
public static void migrate(File preKeysPath, PreKeyStore preKeyStore) {

View file

@ -14,7 +14,7 @@ import java.util.regex.Pattern;
public class LegacySignedPreKeyStore {
private final static Logger logger = LoggerFactory.getLogger(LegacySignedPreKeyStore.class);
private static final Logger logger = LoggerFactory.getLogger(LegacySignedPreKeyStore.class);
static final Pattern signedPreKeyFileNamePattern = Pattern.compile("(\\d+)");
public static void migrate(File signedPreKeysPath, SignedPreKeyStore signedPreKeyStore) {

View file

@ -20,7 +20,7 @@ import java.util.Collection;
public class PreKeyStore implements SignalServicePreKeyStore {
private static final String TABLE_PRE_KEY = "pre_key";
private final static Logger logger = LoggerFactory.getLogger(PreKeyStore.class);
private static final Logger logger = LoggerFactory.getLogger(PreKeyStore.class);
private final Database database;
private final int accountIdType;

View file

@ -23,7 +23,7 @@ import static org.asamk.signal.manager.config.ServiceConfig.PREKEY_ARCHIVE_AGE;
public class SignedPreKeyStore implements org.signal.libsignal.protocol.state.SignedPreKeyStore {
private static final String TABLE_SIGNED_PRE_KEY = "signed_pre_key";
private final static Logger logger = LoggerFactory.getLogger(SignedPreKeyStore.class);
private static final Logger logger = LoggerFactory.getLogger(SignedPreKeyStore.class);
private final Database database;
private final int accountIdType;

View file

@ -25,7 +25,7 @@ import java.util.stream.Collectors;
public class LegacyJsonIdentityKeyStore {
private final static Logger logger = LoggerFactory.getLogger(LegacyJsonIdentityKeyStore.class);
private static final Logger logger = LoggerFactory.getLogger(LegacyJsonIdentityKeyStore.class);
private final List<LegacyIdentityInfo> identities;
private final IdentityKeyPair identityKeyPair;

View file

@ -24,7 +24,7 @@ import java.util.stream.Collectors;
public class LegacyRecipientStore2 {
private final static Logger logger = LoggerFactory.getLogger(LegacyRecipientStore2.class);
private static final Logger logger = LoggerFactory.getLogger(LegacyRecipientStore2.class);
public static void migrate(File file, RecipientStore recipientStore) {
final var objectMapper = Utils.createStorageObjectMapper();

View file

@ -12,7 +12,7 @@ import java.util.stream.Collectors;
public class MergeRecipientHelper {
private final static Logger logger = LoggerFactory.getLogger(MergeRecipientHelper.class);
private static final Logger logger = LoggerFactory.getLogger(MergeRecipientHelper.class);
static Pair<RecipientId, List<RecipientId>> resolveRecipientTrustedLocked(
Store store, RecipientAddress address

View file

@ -36,7 +36,7 @@ import java.util.stream.Collectors;
public class RecipientStore implements RecipientIdCreator, RecipientResolver, RecipientTrustedResolver, ContactsStore, ProfileStore {
private final static Logger logger = LoggerFactory.getLogger(RecipientStore.class);
private static final Logger logger = LoggerFactory.getLogger(RecipientStore.class);
private static final String TABLE_RECIPIENT = "recipient";
private static final String SQL_IS_CONTACT = "r.given_name IS NOT NULL OR r.family_name IS NOT NULL OR r.expiration_time > 0 OR r.profile_sharing = TRUE OR r.color IS NOT NULL OR r.blocked = TRUE OR r.archived = TRUE";

View file

@ -22,7 +22,7 @@ import java.util.regex.Pattern;
public class LegacySenderKeyRecordStore {
private final static Logger logger = LoggerFactory.getLogger(LegacySenderKeyRecordStore.class);
private static final Logger logger = LoggerFactory.getLogger(LegacySenderKeyRecordStore.class);
public static void migrate(
final File senderKeysPath,
@ -70,7 +70,7 @@ public class LegacySenderKeyRecordStore {
}
}
final static Pattern senderKeyFileNamePattern = Pattern.compile("(\\d+)_(\\d+)_([\\da-z\\-]+)");
static final Pattern senderKeyFileNamePattern = Pattern.compile("(\\d+)_(\\d+)_([\\da-z\\-]+)");
private static List<Key> parseFileNames(final File[] files, final RecipientResolver resolver) {
return Arrays.stream(files)

View file

@ -19,7 +19,7 @@ import java.util.Set;
public class LegacySenderKeySharedStore {
private final static Logger logger = LoggerFactory.getLogger(LegacySenderKeySharedStore.class);
private static final Logger logger = LoggerFactory.getLogger(LegacySenderKeySharedStore.class);
public static void migrate(
final File file,

View file

@ -20,8 +20,8 @@ import java.util.UUID;
public class SenderKeyRecordStore implements SenderKeyStore {
private final static Logger logger = LoggerFactory.getLogger(SenderKeyRecordStore.class);
private final static String TABLE_SENDER_KEY = "sender_key";
private static final Logger logger = LoggerFactory.getLogger(SenderKeyRecordStore.class);
private static final String TABLE_SENDER_KEY = "sender_key";
private final Database database;

View file

@ -19,8 +19,8 @@ import java.util.stream.Collectors;
public class SenderKeySharedStore {
private final static Logger logger = LoggerFactory.getLogger(SenderKeySharedStore.class);
private final static String TABLE_SENDER_KEY_SHARED = "sender_key_shared";
private static final Logger logger = LoggerFactory.getLogger(SenderKeySharedStore.class);
private static final String TABLE_SENDER_KEY_SHARED = "sender_key_shared";
private final Database database;

View file

@ -22,7 +22,7 @@ import java.util.regex.Pattern;
public class LegacySessionStore {
private final static Logger logger = LoggerFactory.getLogger(LegacySessionStore.class);
private static final Logger logger = LoggerFactory.getLogger(LegacySessionStore.class);
public static void migrate(
final File sessionsPath,

View file

@ -28,7 +28,7 @@ import java.util.stream.Collectors;
public class SessionStore implements SignalServiceSessionStore {
private static final String TABLE_SESSION = "session";
private final static Logger logger = LoggerFactory.getLogger(SessionStore.class);
private static final Logger logger = LoggerFactory.getLogger(SessionStore.class);
private final Map<Key, SessionRecord> cachedSessions = new HashMap<>();

View file

@ -14,7 +14,7 @@ import java.util.List;
public class StickerStore {
private final static Logger logger = LoggerFactory.getLogger(StickerStore.class);
private static final Logger logger = LoggerFactory.getLogger(StickerStore.class);
private static final String TABLE_STICKER = "sticker";
private final Database database;

View file

@ -18,9 +18,9 @@ import java.util.Optional;
public class MessageCacheUtils {
private final static Logger logger = LoggerFactory.getLogger(MessageCacheUtils.class);
private static final Logger logger = LoggerFactory.getLogger(MessageCacheUtils.class);
final static int CURRENT_VERSION = 9;
static final int CURRENT_VERSION = 9;
public static SignalServiceEnvelope loadEnvelope(File file) throws IOException {
try (var f = new FileInputStream(file)) {

View file

@ -26,7 +26,7 @@ import java.util.function.Consumer;
public class NumberVerificationUtils {
private final static Logger logger = LoggerFactory.getLogger(NumberVerificationUtils.class);
private static final Logger logger = LoggerFactory.getLogger(NumberVerificationUtils.class);
public static String handleVerificationSession(
SignalServiceAccountManager accountManager,

View file

@ -12,7 +12,7 @@ import okio.ByteString;
public class PaymentUtils {
private final static Logger logger = LoggerFactory.getLogger(PaymentUtils.class);
private static final Logger logger = LoggerFactory.getLogger(PaymentUtils.class);
private PaymentUtils() {
}

View file

@ -19,7 +19,7 @@ import java.util.HashSet;
public class ProfileUtils {
private final static Logger logger = LoggerFactory.getLogger(ProfileUtils.class);
private static final Logger logger = LoggerFactory.getLogger(ProfileUtils.class);
public static Profile decryptProfile(
final ProfileKey profileKey, final SignalServiceProfile encryptedProfile

View file

@ -32,7 +32,7 @@ import java.util.stream.StreamSupport;
public class Utils {
private final static Logger logger = LoggerFactory.getLogger(Utils.class);
private static final Logger logger = LoggerFactory.getLogger(Utils.class);
public static Pair<StreamDetails, Optional<String>> createStreamDetailsFromDataURI(final String dataURI) {
final DataURI uri = DataURI.of(dataURI);

View file

@ -47,7 +47,7 @@ import static net.sourceforge.argparse4j.DefaultSettings.VERSION_0_9_0_DEFAULT_S
public class App {
private final static Logger logger = LoggerFactory.getLogger(App.class);
private static final Logger logger = LoggerFactory.getLogger(App.class);
private final Namespace ns;

View file

@ -2,14 +2,14 @@ package org.asamk.signal;
public class BaseConfig {
public final static String PROJECT_NAME = BaseConfig.class.getPackage().getImplementationTitle();
public final static String PROJECT_VERSION = BaseConfig.class.getPackage().getImplementationVersion();
public static final String PROJECT_NAME = BaseConfig.class.getPackage().getImplementationTitle();
public static final String PROJECT_VERSION = BaseConfig.class.getPackage().getImplementationVersion();
final static String USER_AGENT_SIGNAL_ANDROID = "Signal-Android/6.39.1";
final static String USER_AGENT_SIGNAL_CLI = PROJECT_NAME == null
static final String USER_AGENT_SIGNAL_ANDROID = "Signal-Android/6.39.1";
static final String USER_AGENT_SIGNAL_CLI = PROJECT_NAME == null
? "signal-cli"
: PROJECT_NAME + "/" + PROJECT_VERSION;
final static String USER_AGENT = USER_AGENT_SIGNAL_ANDROID + " " + USER_AGENT_SIGNAL_CLI;
static final String USER_AGENT = USER_AGENT_SIGNAL_ANDROID + " " + USER_AGENT_SIGNAL_CLI;
private BaseConfig() {
}

View file

@ -20,7 +20,7 @@ import java.net.URISyntaxException;
public class AddDeviceCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(AddDeviceCommand.class);
private static final Logger logger = LoggerFactory.getLogger(AddDeviceCommand.class);
@Override
public String getName() {

View file

@ -18,7 +18,7 @@ import java.net.URISyntaxException;
public class AddStickerPackCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(AddStickerPackCommand.class);
private static final Logger logger = LoggerFactory.getLogger(AddStickerPackCommand.class);
@Override
public String getName() {

View file

@ -19,7 +19,7 @@ import java.io.IOException;
public class BlockCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(BlockCommand.class);
private static final Logger logger = LoggerFactory.getLogger(BlockCommand.class);
@Override
public String getName() {

View file

@ -50,7 +50,7 @@ import static org.asamk.signal.util.CommandUtil.getReceiveConfig;
public class DaemonCommand implements MultiLocalCommand, LocalCommand {
private final static Logger logger = LoggerFactory.getLogger(DaemonCommand.class);
private static final Logger logger = LoggerFactory.getLogger(DaemonCommand.class);
@Override
public String getName() {

View file

@ -18,7 +18,7 @@ import java.util.concurrent.TimeoutException;
public class FinishLinkCommand implements JsonRpcMultiCommand<FinishLinkCommand.FinishLinkParams> {
private final static Logger logger = LoggerFactory.getLogger(FinishLinkCommand.class);
private static final Logger logger = LoggerFactory.getLogger(FinishLinkCommand.class);
@Override
public String getName() {

View file

@ -22,7 +22,7 @@ import java.util.Map;
public class GetUserStatusCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(GetUserStatusCommand.class);
private static final Logger logger = LoggerFactory.getLogger(GetUserStatusCommand.class);
@Override
public String getName() {

View file

@ -27,7 +27,7 @@ import static org.asamk.signal.util.CommandUtil.getReceiveConfig;
public class JsonRpcDispatcherCommand implements LocalCommand, MultiLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(JsonRpcDispatcherCommand.class);
private static final Logger logger = LoggerFactory.getLogger(JsonRpcDispatcherCommand.class);
@Override
public String getName() {

View file

@ -18,7 +18,7 @@ import java.util.concurrent.TimeoutException;
public class LinkCommand implements ProvisioningCommand {
private final static Logger logger = LoggerFactory.getLogger(LinkCommand.class);
private static final Logger logger = LoggerFactory.getLogger(LinkCommand.class);
@Override
public String getName() {

View file

@ -19,7 +19,7 @@ import java.util.List;
public class ListDevicesCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(ListDevicesCommand.class);
private static final Logger logger = LoggerFactory.getLogger(ListDevicesCommand.class);
@Override
public String getName() {

View file

@ -21,7 +21,7 @@ import java.util.stream.Collectors;
public class ListGroupsCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(ListGroupsCommand.class);
private static final Logger logger = LoggerFactory.getLogger(ListGroupsCommand.class);
@Override
public String getName() {

View file

@ -22,7 +22,7 @@ import java.util.UUID;
public class ListIdentitiesCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(ListIdentitiesCommand.class);
private static final Logger logger = LoggerFactory.getLogger(ListIdentitiesCommand.class);
@Override
public String getName() {

View file

@ -23,7 +23,7 @@ import static org.asamk.signal.util.SendMessageResultUtils.outputResult;
public class QuitGroupCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(QuitGroupCommand.class);
private static final Logger logger = LoggerFactory.getLogger(QuitGroupCommand.class);
@Override
public String getName() {

View file

@ -30,7 +30,7 @@ import java.util.Optional;
public class ReceiveCommand implements LocalCommand, JsonRpcSingleCommand<ReceiveCommand.ReceiveParams> {
private final static Logger logger = LoggerFactory.getLogger(ReceiveCommand.class);
private static final Logger logger = LoggerFactory.getLogger(ReceiveCommand.class);
@Override
public String getName() {

View file

@ -35,7 +35,7 @@ import static org.asamk.signal.util.SendMessageResultUtils.outputResult;
public class SendCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(SendCommand.class);
private static final Logger logger = LoggerFactory.getLogger(SendCommand.class);
@Override
public String getName() {

View file

@ -14,7 +14,7 @@ import java.util.concurrent.TimeoutException;
public class StartLinkCommand implements JsonRpcMultiCommand<Void> {
private final static Logger logger = LoggerFactory.getLogger(StartLinkCommand.class);
private static final Logger logger = LoggerFactory.getLogger(StartLinkCommand.class);
@Override
public String getName() {

View file

@ -19,7 +19,7 @@ import java.io.IOException;
public class UnblockCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(UnblockCommand.class);
private static final Logger logger = LoggerFactory.getLogger(UnblockCommand.class);
@Override
public String getName() {

View file

@ -32,7 +32,7 @@ import java.util.stream.Stream;
public class UpdateGroupCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(UpdateGroupCommand.class);
private static final Logger logger = LoggerFactory.getLogger(UpdateGroupCommand.class);
@Override
public String getName() {

View file

@ -20,7 +20,7 @@ import java.util.Map;
public class UploadStickerPackCommand implements JsonRpcLocalCommand {
private final static Logger logger = LoggerFactory.getLogger(UploadStickerPackCommand.class);
private static final Logger logger = LoggerFactory.getLogger(UploadStickerPackCommand.class);
@Override
public String getName() {

View file

@ -21,7 +21,7 @@ import java.util.List;
public class VerifyCommand implements RegistrationCommand, JsonRpcRegistrationCommand<VerifyCommand.VerifyParams> {
private final static Logger logger = LoggerFactory.getLogger(VerifyCommand.class);
private static final Logger logger = LoggerFactory.getLogger(VerifyCommand.class);
@Override
public String getName() {

View file

@ -26,7 +26,7 @@ import java.util.concurrent.TimeoutException;
public class DbusSignalControlImpl implements org.asamk.SignalControl {
private final static Logger logger = LoggerFactory.getLogger(DbusSignalControlImpl.class);
private static final Logger logger = LoggerFactory.getLogger(DbusSignalControlImpl.class);
private final MultiAccountManager c;
private final String objectPath;

View file

@ -76,7 +76,7 @@ public class DbusSignalImpl implements Signal, AutoCloseable {
private DbusReceiveMessageHandler dbusMessageHandler;
private int subscriberCount;
private final static Logger logger = LoggerFactory.getLogger(DbusSignalImpl.class);
private static final Logger logger = LoggerFactory.getLogger(DbusSignalImpl.class);
public DbusSignalImpl(
final Manager m, DBusConnection connection, final String objectPath, final boolean noReceiveOnStart

View file

@ -26,7 +26,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
public class HttpServerHandler implements AutoCloseable {
private final static Logger logger = LoggerFactory.getLogger(HttpServerHandler.class);
private static final Logger logger = LoggerFactory.getLogger(HttpServerHandler.class);
private final ObjectMapper objectMapper = Util.createJsonObjectMapper();

View file

@ -10,7 +10,7 @@ import java.util.HashMap;
public class JsonReceiveMessageHandler implements Manager.ReceiveMessageHandler {
private final static Logger logger = LoggerFactory.getLogger(JsonReceiveMessageHandler.class);
private static final Logger logger = LoggerFactory.getLogger(JsonReceiveMessageHandler.class);
private final Manager m;
private final JsonWriter jsonWriter;

View file

@ -23,7 +23,7 @@ import java.util.stream.StreamSupport;
public class JsonRpcReader {
private final static Logger logger = LoggerFactory.getLogger(JsonRpcReader.class);
private static final Logger logger = LoggerFactory.getLogger(JsonRpcReader.class);
private final JsonRpcSender jsonRpcSender;
private final ObjectMapper objectMapper;

View file

@ -32,7 +32,7 @@ import java.util.function.Function;
public class SignalJsonRpcCommandHandler {
private final static Logger logger = LoggerFactory.getLogger(SignalJsonRpcDispatcherHandler.class);
private static final Logger logger = LoggerFactory.getLogger(SignalJsonRpcDispatcherHandler.class);
private static final int USER_ERROR = -1;
private static final int IO_ERROR = -3;

View file

@ -32,7 +32,7 @@ import java.util.function.Supplier;
public class SignalJsonRpcDispatcherHandler {
private final static Logger logger = LoggerFactory.getLogger(SignalJsonRpcDispatcherHandler.class);
private static final Logger logger = LoggerFactory.getLogger(SignalJsonRpcDispatcherHandler.class);
private final ObjectMapper objectMapper;
private final JsonRpcSender jsonRpcSender;

View file

@ -38,7 +38,7 @@ public final class PlainTextWriterImpl implements PlainTextWriter {
private static final class IndentedPlainTextWriter implements PlainTextWriter {
private final static int INDENTATION = 2;
private static final int INDENTATION = 2;
private final String spaces = " ".repeat(INDENTATION);
private final PlainTextWriter plainTextWriter;

View file

@ -2,7 +2,7 @@ package org.asamk.signal.util;
public class Hex {
private final static char[] HEX_DIGITS = {
private static final char[] HEX_DIGITS = {
'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'
};

View file

@ -35,7 +35,7 @@ import static java.nio.file.attribute.PosixFilePermission.OWNER_WRITE;
public class IOUtils {
private final static Logger logger = LoggerFactory.getLogger(IOUtils.class);
private static final Logger logger = LoggerFactory.getLogger(IOUtils.class);
private IOUtils() {
}

View file

@ -20,7 +20,7 @@ import java.util.stream.Collectors;
public class Util {
private final static Logger logger = LoggerFactory.getLogger(Util.class);
private static final Logger logger = LoggerFactory.getLogger(Util.class);
private Util() {
}