Remove unused imports
This commit is contained in:
		
							parent
							
								
									20902df122
								
							
						
					
					
						commit
						c38572307d
					
				| 
						 | 
					@ -1 +1 @@
 | 
				
			||||||
Subproject commit 45e09e2ad842513e495f64332fb8e45e1ac7b2da
 | 
					Subproject commit 6094634b57ba6b3ce6df4cfd7f9f63b03de30292
 | 
				
			||||||
| 
						 | 
					@ -7,12 +7,9 @@ package org.whispersystems.gcm.server;
 | 
				
			||||||
import com.fasterxml.jackson.core.JsonProcessingException;
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
import com.fasterxml.jackson.databind.ObjectMapper;
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
import com.google.common.annotations.VisibleForTesting;
 | 
					import com.google.common.annotations.VisibleForTesting;
 | 
				
			||||||
import io.github.resilience4j.retry.IntervalFunction;
 | 
					import io.github.resilience4j.core.IntervalFunction;
 | 
				
			||||||
import io.github.resilience4j.retry.Retry;
 | 
					import io.github.resilience4j.retry.Retry;
 | 
				
			||||||
import io.github.resilience4j.retry.RetryConfig;
 | 
					import io.github.resilience4j.retry.RetryConfig;
 | 
				
			||||||
import org.whispersystems.gcm.server.internal.GcmResponseEntity;
 | 
					 | 
				
			||||||
import org.whispersystems.gcm.server.internal.GcmResponseListEntity;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import java.io.IOException;
 | 
					import java.io.IOException;
 | 
				
			||||||
import java.net.URI;
 | 
					import java.net.URI;
 | 
				
			||||||
import java.net.http.HttpClient;
 | 
					import java.net.http.HttpClient;
 | 
				
			||||||
| 
						 | 
					@ -26,6 +23,8 @@ import java.util.concurrent.CompletionException;
 | 
				
			||||||
import java.util.concurrent.Executors;
 | 
					import java.util.concurrent.Executors;
 | 
				
			||||||
import java.util.concurrent.ScheduledExecutorService;
 | 
					import java.util.concurrent.ScheduledExecutorService;
 | 
				
			||||||
import java.util.concurrent.TimeoutException;
 | 
					import java.util.concurrent.TimeoutException;
 | 
				
			||||||
 | 
					import org.whispersystems.gcm.server.internal.GcmResponseEntity;
 | 
				
			||||||
 | 
					import org.whispersystems.gcm.server.internal.GcmResponseListEntity;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
 * The main interface to sending GCM messages.  Thread safe.
 | 
					 * The main interface to sending GCM messages.  Thread safe.
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
							
								
								
									
										2
									
								
								pom.xml
								
								
								
								
							
							
						
						
									
										2
									
								
								pom.xml
								
								
								
								
							| 
						 | 
					@ -49,7 +49,7 @@
 | 
				
			||||||
    <commons-io.version>2.9.0</commons-io.version>
 | 
					    <commons-io.version>2.9.0</commons-io.version>
 | 
				
			||||||
    <dropwizard.version>2.0.28</dropwizard.version>
 | 
					    <dropwizard.version>2.0.28</dropwizard.version>
 | 
				
			||||||
    <dropwizard-metrics-datadog.version>1.1.13</dropwizard-metrics-datadog.version>
 | 
					    <dropwizard-metrics-datadog.version>1.1.13</dropwizard-metrics-datadog.version>
 | 
				
			||||||
    <gson.version>2.8.8</gson.version>
 | 
					    <gson.version>2.9.0</gson.version>
 | 
				
			||||||
    <guava.version>30.1.1-jre</guava.version>
 | 
					    <guava.version>30.1.1-jre</guava.version>
 | 
				
			||||||
    <jackson.version>2.13.2.20220328</jackson.version>
 | 
					    <jackson.version>2.13.2.20220328</jackson.version>
 | 
				
			||||||
    <jaxb.version>2.3.1</jaxb.version>
 | 
					    <jaxb.version>2.3.1</jaxb.version>
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -115,7 +115,7 @@ public class PubSubConnection {
 | 
				
			||||||
    byte[]            channelName       = inputStream.readFully(channelNameHeader.getStringLength());
 | 
					    byte[]            channelName       = inputStream.readFully(channelNameHeader.getStringLength());
 | 
				
			||||||
    inputStream.readLine();
 | 
					    inputStream.readLine();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    IntReply subscriptionCount = new IntReply(inputStream.readLine());
 | 
					    new IntReply(inputStream.readLine());
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return new String(channelName);
 | 
					    return new String(channelName);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,9 +5,7 @@
 | 
				
			||||||
package org.whispersystems.textsecuregcm.auth;
 | 
					package org.whispersystems.textsecuregcm.auth;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.Base64;
 | 
					import java.util.Base64;
 | 
				
			||||||
import java.util.UUID;
 | 
					 | 
				
			||||||
import org.apache.commons.lang3.StringUtils;
 | 
					import org.apache.commons.lang3.StringUtils;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.storage.Device;
 | 
					 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.Pair;
 | 
					import org.whispersystems.textsecuregcm.util.Pair;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class BasicAuthorizationHeader {
 | 
					public class BasicAuthorizationHeader {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,6 +7,9 @@ package org.whispersystems.textsecuregcm.auth;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.google.protobuf.ByteString;
 | 
					import com.google.protobuf.ByteString;
 | 
				
			||||||
import com.google.protobuf.InvalidProtocolBufferException;
 | 
					import com.google.protobuf.InvalidProtocolBufferException;
 | 
				
			||||||
 | 
					import java.security.InvalidKeyException;
 | 
				
			||||||
 | 
					import java.util.Base64;
 | 
				
			||||||
 | 
					import java.util.concurrent.TimeUnit;
 | 
				
			||||||
import org.signal.libsignal.protocol.ecc.Curve;
 | 
					import org.signal.libsignal.protocol.ecc.Curve;
 | 
				
			||||||
import org.signal.libsignal.protocol.ecc.ECPrivateKey;
 | 
					import org.signal.libsignal.protocol.ecc.ECPrivateKey;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate;
 | 
					import org.whispersystems.textsecuregcm.entities.MessageProtos.SenderCertificate;
 | 
				
			||||||
| 
						 | 
					@ -14,11 +17,6 @@ import org.whispersystems.textsecuregcm.entities.MessageProtos.ServerCertificate
 | 
				
			||||||
import org.whispersystems.textsecuregcm.storage.Account;
 | 
					import org.whispersystems.textsecuregcm.storage.Account;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.storage.Device;
 | 
					import org.whispersystems.textsecuregcm.storage.Device;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.io.IOException;
 | 
					 | 
				
			||||||
import java.security.InvalidKeyException;
 | 
					 | 
				
			||||||
import java.util.Base64;
 | 
					 | 
				
			||||||
import java.util.concurrent.TimeUnit;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class CertificateGenerator {
 | 
					public class CertificateGenerator {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private final ECPrivateKey      privateKey;
 | 
					  private final ECPrivateKey      privateKey;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,7 +10,6 @@ import java.util.List;
 | 
				
			||||||
import java.util.Optional;
 | 
					import java.util.Optional;
 | 
				
			||||||
import java.util.UUID;
 | 
					import java.util.UUID;
 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					import java.util.stream.Collectors;
 | 
				
			||||||
import org.glassfish.jersey.server.ContainerRequest;
 | 
					 | 
				
			||||||
import org.glassfish.jersey.server.monitoring.RequestEvent;
 | 
					import org.glassfish.jersey.server.monitoring.RequestEvent;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.storage.Account;
 | 
					import org.whispersystems.textsecuregcm.storage.Account;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.Pair;
 | 
					import org.whispersystems.textsecuregcm.util.Pair;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,6 @@ package org.whispersystems.textsecuregcm.auth;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import java.util.UUID;
 | 
					import java.util.UUID;
 | 
				
			||||||
import org.glassfish.jersey.server.ContainerRequest;
 | 
					 | 
				
			||||||
import org.glassfish.jersey.server.monitoring.RequestEvent;
 | 
					import org.glassfish.jersey.server.monitoring.RequestEvent;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.Pair;
 | 
					import org.whispersystems.textsecuregcm.util.Pair;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,7 +5,6 @@
 | 
				
			||||||
package org.whispersystems.textsecuregcm.configuration;
 | 
					package org.whispersystems.textsecuregcm.configuration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
import java.time.Duration;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class RateLimitsConfiguration {
 | 
					public class RateLimitsConfiguration {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,9 +1,6 @@
 | 
				
			||||||
package org.whispersystems.textsecuregcm.configuration;
 | 
					package org.whispersystems.textsecuregcm.configuration;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
 | 
					 | 
				
			||||||
import com.fasterxml.jackson.databind.annotation.JsonNaming;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
import javax.validation.constraints.NotEmpty;
 | 
					import javax.validation.constraints.NotEmpty;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class TwilioVerificationTextConfiguration {
 | 
					public class TwilioVerificationTextConfiguration {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,12 +6,10 @@
 | 
				
			||||||
package org.whispersystems.textsecuregcm.configuration.dynamic;
 | 
					package org.whispersystems.textsecuregcm.configuration.dynamic;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.configuration.TurnUriConfiguration;
 | 
					 | 
				
			||||||
import java.util.Collections;
 | 
					import java.util.Collections;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import javax.validation.Valid;
 | 
					import javax.validation.Valid;
 | 
				
			||||||
import javax.validation.constraints.NotEmpty;
 | 
					import org.whispersystems.textsecuregcm.configuration.TurnUriConfiguration;
 | 
				
			||||||
import javax.validation.constraints.NotNull;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class DynamicTurnConfiguration {
 | 
					public class DynamicTurnConfiguration {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,7 +14,6 @@ import java.security.spec.InvalidKeySpecException;
 | 
				
			||||||
import java.time.ZoneOffset;
 | 
					import java.time.ZoneOffset;
 | 
				
			||||||
import java.time.ZonedDateTime;
 | 
					import java.time.ZonedDateTime;
 | 
				
			||||||
import java.util.Base64;
 | 
					import java.util.Base64;
 | 
				
			||||||
import java.util.HashMap;
 | 
					 | 
				
			||||||
import java.util.Map;
 | 
					import java.util.Map;
 | 
				
			||||||
import javax.annotation.Nonnull;
 | 
					import javax.annotation.Nonnull;
 | 
				
			||||||
import javax.ws.rs.GET;
 | 
					import javax.ws.rs.GET;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,8 +5,12 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package org.whispersystems.textsecuregcm.controllers;
 | 
					package org.whispersystems.textsecuregcm.controllers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import static org.whispersystems.textsecuregcm.metrics.MetricsUtil.name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.codahale.metrics.annotation.Timed;
 | 
					import com.codahale.metrics.annotation.Timed;
 | 
				
			||||||
import io.dropwizard.auth.Auth;
 | 
					import io.dropwizard.auth.Auth;
 | 
				
			||||||
 | 
					import io.micrometer.core.instrument.Metrics;
 | 
				
			||||||
 | 
					import io.micrometer.core.instrument.Tags;
 | 
				
			||||||
import java.util.NoSuchElementException;
 | 
					import java.util.NoSuchElementException;
 | 
				
			||||||
import javax.validation.Valid;
 | 
					import javax.validation.Valid;
 | 
				
			||||||
import javax.ws.rs.Consumes;
 | 
					import javax.ws.rs.Consumes;
 | 
				
			||||||
| 
						 | 
					@ -18,9 +22,6 @@ import javax.ws.rs.Produces;
 | 
				
			||||||
import javax.ws.rs.core.HttpHeaders;
 | 
					import javax.ws.rs.core.HttpHeaders;
 | 
				
			||||||
import javax.ws.rs.core.MediaType;
 | 
					import javax.ws.rs.core.MediaType;
 | 
				
			||||||
import javax.ws.rs.core.Response;
 | 
					import javax.ws.rs.core.Response;
 | 
				
			||||||
import io.micrometer.core.instrument.Metrics;
 | 
					 | 
				
			||||||
import io.micrometer.core.instrument.Tag;
 | 
					 | 
				
			||||||
import io.micrometer.core.instrument.Tags;
 | 
					 | 
				
			||||||
import org.whispersystems.textsecuregcm.auth.AuthenticatedAccount;
 | 
					import org.whispersystems.textsecuregcm.auth.AuthenticatedAccount;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.entities.AnswerChallengeRequest;
 | 
					import org.whispersystems.textsecuregcm.entities.AnswerChallengeRequest;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.entities.AnswerPushChallengeRequest;
 | 
					import org.whispersystems.textsecuregcm.entities.AnswerPushChallengeRequest;
 | 
				
			||||||
| 
						 | 
					@ -30,8 +31,6 @@ import org.whispersystems.textsecuregcm.metrics.UserAgentTagUtil;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.push.NotPushRegisteredException;
 | 
					import org.whispersystems.textsecuregcm.push.NotPushRegisteredException;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.ForwardedIpUtil;
 | 
					import org.whispersystems.textsecuregcm.util.ForwardedIpUtil;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static org.whispersystems.textsecuregcm.metrics.MetricsUtil.name;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
@Path("/v1/challenge")
 | 
					@Path("/v1/challenge")
 | 
				
			||||||
public class ChallengeController {
 | 
					public class ChallengeController {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@ package org.whispersystems.textsecuregcm.controllers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.codahale.metrics.annotation.Timed;
 | 
					import com.codahale.metrics.annotation.Timed;
 | 
				
			||||||
import io.dropwizard.auth.Auth;
 | 
					import io.dropwizard.auth.Auth;
 | 
				
			||||||
import java.util.Base64;
 | 
					 | 
				
			||||||
import java.util.UUID;
 | 
					import java.util.UUID;
 | 
				
			||||||
import javax.ws.rs.GET;
 | 
					import javax.ws.rs.GET;
 | 
				
			||||||
import javax.ws.rs.Path;
 | 
					import javax.ws.rs.Path;
 | 
				
			||||||
| 
						 | 
					@ -16,9 +15,6 @@ import javax.ws.rs.core.Response;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.auth.AuthenticatedAccount;
 | 
					import org.whispersystems.textsecuregcm.auth.AuthenticatedAccount;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.auth.ExternalServiceCredentialGenerator;
 | 
					import org.whispersystems.textsecuregcm.auth.ExternalServiceCredentialGenerator;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.auth.ExternalServiceCredentials;
 | 
					import org.whispersystems.textsecuregcm.auth.ExternalServiceCredentials;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.ByteUtil;
 | 
					 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.UUIDUtil;
 | 
					 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.Util;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@Path("/v2/directory")
 | 
					@Path("/v2/directory")
 | 
				
			||||||
public class DirectoryV2Controller {
 | 
					public class DirectoryV2Controller {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -23,7 +23,6 @@ import java.util.Base64;
 | 
				
			||||||
import java.util.Collection;
 | 
					import java.util.Collection;
 | 
				
			||||||
import java.util.Collections;
 | 
					import java.util.Collections;
 | 
				
			||||||
import java.util.HashSet;
 | 
					import java.util.HashSet;
 | 
				
			||||||
import java.util.LinkedList;
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import java.util.Map;
 | 
					import java.util.Map;
 | 
				
			||||||
import java.util.Objects;
 | 
					import java.util.Objects;
 | 
				
			||||||
| 
						 | 
					@ -35,7 +34,6 @@ import java.util.concurrent.ExecutorService;
 | 
				
			||||||
import java.util.concurrent.atomic.AtomicBoolean;
 | 
					import java.util.concurrent.atomic.AtomicBoolean;
 | 
				
			||||||
import java.util.function.Function;
 | 
					import java.util.function.Function;
 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					import java.util.stream.Collectors;
 | 
				
			||||||
import java.util.stream.Stream;
 | 
					 | 
				
			||||||
import javax.annotation.Nonnull;
 | 
					import javax.annotation.Nonnull;
 | 
				
			||||||
import javax.validation.Valid;
 | 
					import javax.validation.Valid;
 | 
				
			||||||
import javax.validation.constraints.NotNull;
 | 
					import javax.validation.constraints.NotNull;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -6,7 +6,6 @@ package org.whispersystems.textsecuregcm.entities;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
import java.util.Map;
 | 
					import java.util.Map;
 | 
				
			||||||
import java.util.HashMap;
 | 
					 | 
				
			||||||
import java.util.UUID;
 | 
					import java.util.UUID;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class ActiveUserTally {
 | 
					public class ActiveUserTally {
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,7 +7,6 @@ package org.whispersystems.textsecuregcm.entities;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonSubTypes;
 | 
					import com.fasterxml.jackson.annotation.JsonSubTypes;
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonTypeInfo;
 | 
					import com.fasterxml.jackson.annotation.JsonTypeInfo;
 | 
				
			||||||
import javax.validation.constraints.NotBlank;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
 | 
					@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
 | 
				
			||||||
@JsonSubTypes({
 | 
					@JsonSubTypes({
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -8,8 +8,6 @@ package org.whispersystems.textsecuregcm.entities;
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonCreator;
 | 
					import com.fasterxml.jackson.annotation.JsonCreator;
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
import javax.validation.constraints.NotEmpty;
 | 
					import javax.validation.constraints.NotEmpty;
 | 
				
			||||||
import org.signal.libsignal.zkgroup.receipts.ReceiptCredentialPresentation;
 | 
					 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.ExactlySize;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class RedeemReceiptRequest {
 | 
					public class RedeemReceiptRequest {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,12 +5,8 @@
 | 
				
			||||||
 | 
					
 | 
				
			||||||
package org.whispersystems.textsecuregcm.entities;
 | 
					package org.whispersystems.textsecuregcm.entities;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonCreator;
 | 
					 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonProperty;
 | 
					import com.fasterxml.jackson.annotation.JsonProperty;
 | 
				
			||||||
import com.fasterxml.jackson.annotation.JsonUnwrapped;
 | 
					import com.fasterxml.jackson.annotation.JsonUnwrapped;
 | 
				
			||||||
import javax.annotation.Nullable;
 | 
					 | 
				
			||||||
import java.util.List;
 | 
					 | 
				
			||||||
import java.util.UUID;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class VersionedProfileResponse {
 | 
					public class VersionedProfileResponse {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -3,11 +3,11 @@ package org.whispersystems.textsecuregcm.limits;
 | 
				
			||||||
import static com.codahale.metrics.MetricRegistry.name;
 | 
					import static com.codahale.metrics.MetricRegistry.name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import io.micrometer.core.instrument.Metrics;
 | 
					import io.micrometer.core.instrument.Metrics;
 | 
				
			||||||
 | 
					import io.micrometer.core.instrument.Tag;
 | 
				
			||||||
 | 
					import io.micrometer.core.instrument.Tags;
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
import java.util.Collections;
 | 
					import java.util.Collections;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import io.micrometer.core.instrument.Tag;
 | 
					 | 
				
			||||||
import io.micrometer.core.instrument.Tags;
 | 
					 | 
				
			||||||
import org.whispersystems.textsecuregcm.abuse.RateLimitChallengeListener;
 | 
					import org.whispersystems.textsecuregcm.abuse.RateLimitChallengeListener;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.controllers.RateLimitExceededException;
 | 
					import org.whispersystems.textsecuregcm.controllers.RateLimitExceededException;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.metrics.UserAgentTagUtil;
 | 
					import org.whispersystems.textsecuregcm.metrics.UserAgentTagUtil;
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,6 @@ import org.whispersystems.textsecuregcm.push.NotPushRegisteredException;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.recaptcha.RecaptchaClient;
 | 
					import org.whispersystems.textsecuregcm.recaptcha.RecaptchaClient;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.storage.Account;
 | 
					import org.whispersystems.textsecuregcm.storage.Account;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.Util;
 | 
					import org.whispersystems.textsecuregcm.util.Util;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.ua.ClientPlatform;
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class RateLimitChallengeManager {
 | 
					public class RateLimitChallengeManager {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -20,8 +20,6 @@ import io.dropwizard.logging.AbstractAppenderFactory;
 | 
				
			||||||
import io.dropwizard.logging.async.AsyncAppenderFactory;
 | 
					import io.dropwizard.logging.async.AsyncAppenderFactory;
 | 
				
			||||||
import io.dropwizard.logging.filter.LevelFilterFactory;
 | 
					import io.dropwizard.logging.filter.LevelFilterFactory;
 | 
				
			||||||
import io.dropwizard.logging.layout.LayoutFactory;
 | 
					import io.dropwizard.logging.layout.LayoutFactory;
 | 
				
			||||||
import java.net.InetAddress;
 | 
					 | 
				
			||||||
import java.net.UnknownHostException;
 | 
					 | 
				
			||||||
import java.time.Duration;
 | 
					import java.time.Duration;
 | 
				
			||||||
import javax.validation.constraints.NotEmpty;
 | 
					import javax.validation.constraints.NotEmpty;
 | 
				
			||||||
import net.logstash.logback.appender.LogstashTcpSocketAppender;
 | 
					import net.logstash.logback.appender.LogstashTcpSocketAppender;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,6 @@ import java.nio.charset.StandardCharsets;
 | 
				
			||||||
import java.security.MessageDigest;
 | 
					import java.security.MessageDigest;
 | 
				
			||||||
import java.security.NoSuchAlgorithmException;
 | 
					import java.security.NoSuchAlgorithmException;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import java.util.concurrent.atomic.AtomicInteger;
 | 
					 | 
				
			||||||
import org.apache.commons.codec.binary.Hex;
 | 
					import org.apache.commons.codec.binary.Hex;
 | 
				
			||||||
import org.slf4j.Logger;
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
import org.slf4j.LoggerFactory;
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,15 +11,11 @@ import com.codahale.metrics.MetricRegistry;
 | 
				
			||||||
import com.codahale.metrics.SharedMetricRegistries;
 | 
					import com.codahale.metrics.SharedMetricRegistries;
 | 
				
			||||||
import com.codahale.metrics.Timer;
 | 
					import com.codahale.metrics.Timer;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import org.slf4j.Logger;
 | 
					 | 
				
			||||||
import org.slf4j.LoggerFactory;
 | 
					 | 
				
			||||||
import org.whispersystems.textsecuregcm.storage.mappers.AbusiveHostRuleRowMapper;
 | 
					import org.whispersystems.textsecuregcm.storage.mappers.AbusiveHostRuleRowMapper;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.Constants;
 | 
					import org.whispersystems.textsecuregcm.util.Constants;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class AbusiveHostRules {
 | 
					public class AbusiveHostRules {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private static final Logger logger = LoggerFactory.getLogger(AbusiveHostRules.class);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  public static final String ID = "id";
 | 
					  public static final String ID = "id";
 | 
				
			||||||
  public static final String HOST = "host";
 | 
					  public static final String HOST = "host";
 | 
				
			||||||
  public static final String BLOCKED = "blocked";
 | 
					  public static final String BLOCKED = "blocked";
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -29,7 +29,6 @@ import java.util.UUID;
 | 
				
			||||||
import java.util.concurrent.CompletableFuture;
 | 
					import java.util.concurrent.CompletableFuture;
 | 
				
			||||||
import java.util.concurrent.CompletionException;
 | 
					import java.util.concurrent.CompletionException;
 | 
				
			||||||
import java.util.concurrent.CompletionStage;
 | 
					import java.util.concurrent.CompletionStage;
 | 
				
			||||||
import java.util.concurrent.Semaphore;
 | 
					 | 
				
			||||||
import java.util.concurrent.TimeUnit;
 | 
					import java.util.concurrent.TimeUnit;
 | 
				
			||||||
import java.util.function.Supplier;
 | 
					import java.util.function.Supplier;
 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					import java.util.stream.Collectors;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -10,7 +10,6 @@ import io.micrometer.core.instrument.Metrics;
 | 
				
			||||||
import java.io.IOException;
 | 
					import java.io.IOException;
 | 
				
			||||||
import java.time.Duration;
 | 
					import java.time.Duration;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import java.util.UUID;
 | 
					 | 
				
			||||||
import java.util.concurrent.ScheduledExecutorService;
 | 
					import java.util.concurrent.ScheduledExecutorService;
 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					import java.util.stream.Collectors;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.entities.DirectoryReconciliationRequest.User;
 | 
					import org.whispersystems.textsecuregcm.entities.DirectoryReconciliationRequest.User;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -1,22 +1,21 @@
 | 
				
			||||||
package org.whispersystems.textsecuregcm.storage;
 | 
					package org.whispersystems.textsecuregcm.storage;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import static org.whispersystems.textsecuregcm.metrics.MetricsUtil.name;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import com.fasterxml.jackson.core.JsonProcessingException;
 | 
					import com.fasterxml.jackson.core.JsonProcessingException;
 | 
				
			||||||
import com.fasterxml.jackson.databind.DeserializationFeature;
 | 
					import com.fasterxml.jackson.databind.DeserializationFeature;
 | 
				
			||||||
import com.fasterxml.jackson.databind.ObjectMapper;
 | 
					import com.fasterxml.jackson.databind.ObjectMapper;
 | 
				
			||||||
import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 | 
					import com.fasterxml.jackson.dataformat.yaml.YAMLFactory;
 | 
				
			||||||
import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
 | 
					import com.fasterxml.jackson.datatype.jsr310.JavaTimeModule;
 | 
				
			||||||
import com.google.common.annotations.VisibleForTesting;
 | 
					import com.google.common.annotations.VisibleForTesting;
 | 
				
			||||||
 | 
					import io.micrometer.core.instrument.Metrics;
 | 
				
			||||||
import java.time.Duration;
 | 
					import java.time.Duration;
 | 
				
			||||||
import java.util.Objects;
 | 
					 | 
				
			||||||
import java.util.Optional;
 | 
					import java.util.Optional;
 | 
				
			||||||
import java.util.Set;
 | 
					import java.util.Set;
 | 
				
			||||||
import java.util.UUID;
 | 
					 | 
				
			||||||
import java.util.concurrent.CountDownLatch;
 | 
					 | 
				
			||||||
import java.util.concurrent.atomic.AtomicReference;
 | 
					import java.util.concurrent.atomic.AtomicReference;
 | 
				
			||||||
import javax.validation.ConstraintViolation;
 | 
					import javax.validation.ConstraintViolation;
 | 
				
			||||||
import javax.validation.Validation;
 | 
					import javax.validation.Validation;
 | 
				
			||||||
import javax.validation.Validator;
 | 
					import javax.validation.Validator;
 | 
				
			||||||
import io.micrometer.core.instrument.Metrics;
 | 
					 | 
				
			||||||
import org.slf4j.Logger;
 | 
					import org.slf4j.Logger;
 | 
				
			||||||
import org.slf4j.LoggerFactory;
 | 
					import org.slf4j.LoggerFactory;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.util.Util;
 | 
					import org.whispersystems.textsecuregcm.util.Util;
 | 
				
			||||||
| 
						 | 
					@ -27,8 +26,6 @@ import software.amazon.awssdk.services.appconfigdata.model.GetLatestConfiguratio
 | 
				
			||||||
import software.amazon.awssdk.services.appconfigdata.model.StartConfigurationSessionRequest;
 | 
					import software.amazon.awssdk.services.appconfigdata.model.StartConfigurationSessionRequest;
 | 
				
			||||||
import software.amazon.awssdk.services.appconfigdata.model.StartConfigurationSessionResponse;
 | 
					import software.amazon.awssdk.services.appconfigdata.model.StartConfigurationSessionResponse;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import static org.whispersystems.textsecuregcm.metrics.MetricsUtil.name;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
public class DynamicConfigurationManager<T> {
 | 
					public class DynamicConfigurationManager<T> {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private final String application;
 | 
					  private final String application;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -14,8 +14,6 @@ import java.util.List;
 | 
				
			||||||
import java.util.Optional;
 | 
					import java.util.Optional;
 | 
				
			||||||
import java.util.UUID;
 | 
					import java.util.UUID;
 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					import java.util.stream.Collectors;
 | 
				
			||||||
import org.slf4j.Logger;
 | 
					 | 
				
			||||||
import org.slf4j.LoggerFactory;
 | 
					 | 
				
			||||||
import org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope;
 | 
					import org.whispersystems.textsecuregcm.entities.MessageProtos.Envelope;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.entities.OutgoingMessageEntity;
 | 
					import org.whispersystems.textsecuregcm.entities.OutgoingMessageEntity;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.entities.OutgoingMessageEntityList;
 | 
					import org.whispersystems.textsecuregcm.entities.OutgoingMessageEntityList;
 | 
				
			||||||
| 
						 | 
					@ -25,8 +23,6 @@ import org.whispersystems.textsecuregcm.util.Constants;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public class MessagesManager {
 | 
					public class MessagesManager {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private static final Logger logger = LoggerFactory.getLogger(MessagesManager.class);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
  private static final int RESULT_SET_CHUNK_SIZE = 100;
 | 
					  private static final int RESULT_SET_CHUNK_SIZE = 100;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  private static final MetricRegistry metricRegistry = SharedMetricRegistries.getOrCreate(Constants.METRICS_NAME);
 | 
					  private static final MetricRegistry metricRegistry = SharedMetricRegistries.getOrCreate(Constants.METRICS_NAME);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,8 +11,6 @@ import java.nio.file.Files;
 | 
				
			||||||
import java.nio.file.Path;
 | 
					import java.nio.file.Path;
 | 
				
			||||||
import java.util.ArrayList;
 | 
					import java.util.ArrayList;
 | 
				
			||||||
import java.util.List;
 | 
					import java.util.List;
 | 
				
			||||||
import java.util.stream.Collectors;
 | 
					 | 
				
			||||||
import net.sourceforge.argparse4j.inf.ArgumentAction;
 | 
					 | 
				
			||||||
import net.sourceforge.argparse4j.inf.Namespace;
 | 
					import net.sourceforge.argparse4j.inf.Namespace;
 | 
				
			||||||
import net.sourceforge.argparse4j.inf.Subparser;
 | 
					import net.sourceforge.argparse4j.inf.Subparser;
 | 
				
			||||||
import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicConfiguration;
 | 
					import org.whispersystems.textsecuregcm.configuration.dynamic.DynamicConfiguration;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue