Add missing `@Valid` annotations
This commit is contained in:
parent
8bafb1a641
commit
b666b66160
|
@ -2,6 +2,7 @@ package org.whispersystems.textsecuregcm.configuration;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import org.whispersystems.textsecuregcm.configuration.secrets.SecretString;
|
import org.whispersystems.textsecuregcm.configuration.secrets.SecretString;
|
||||||
|
|
||||||
|
@ -24,8 +25,8 @@ public record Cdn3StorageManagerConfiguration(
|
||||||
@NotNull SecretString clientSecret,
|
@NotNull SecretString clientSecret,
|
||||||
@NotNull Map<Integer, String> sourceSchemes,
|
@NotNull Map<Integer, String> sourceSchemes,
|
||||||
@NotNull Integer numHttpClients,
|
@NotNull Integer numHttpClients,
|
||||||
@NotNull CircuitBreakerConfiguration circuitBreaker,
|
@NotNull @Valid CircuitBreakerConfiguration circuitBreaker,
|
||||||
@NotNull RetryConfiguration retry) {
|
@NotNull @Valid RetryConfiguration retry) {
|
||||||
|
|
||||||
public Cdn3StorageManagerConfiguration {
|
public Cdn3StorageManagerConfiguration {
|
||||||
if (numHttpClients == null) {
|
if (numHttpClients == null) {
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package org.whispersystems.textsecuregcm.configuration;
|
package org.whispersystems.textsecuregcm.configuration;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
@ -15,10 +16,12 @@ public class ClientCdnConfiguration {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Valid
|
||||||
CircuitBreakerConfiguration circuitBreaker = new CircuitBreakerConfiguration();
|
CircuitBreakerConfiguration circuitBreaker = new CircuitBreakerConfiguration();
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Valid
|
||||||
RetryConfiguration retry = new RetryConfiguration();
|
RetryConfiguration retry = new RetryConfiguration();
|
||||||
|
|
||||||
public CircuitBreakerConfiguration getCircuitBreaker() {
|
public CircuitBreakerConfiguration getCircuitBreaker() {
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
package org.whispersystems.textsecuregcm.configuration;
|
package org.whispersystems.textsecuregcm.configuration;
|
||||||
|
|
||||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import com.fasterxml.jackson.annotation.JsonTypeName;
|
import com.fasterxml.jackson.annotation.JsonTypeName;
|
||||||
import org.whispersystems.textsecuregcm.captcha.HCaptchaClient;
|
import org.whispersystems.textsecuregcm.captcha.HCaptchaClient;
|
||||||
|
@ -24,10 +25,12 @@ public class HCaptchaConfiguration implements HCaptchaClientFactory {
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Valid
|
||||||
CircuitBreakerConfiguration circuitBreaker = new CircuitBreakerConfiguration();
|
CircuitBreakerConfiguration circuitBreaker = new CircuitBreakerConfiguration();
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
@NotNull
|
@NotNull
|
||||||
|
@Valid
|
||||||
RetryConfiguration retry = new RetryConfiguration();
|
RetryConfiguration retry = new RetryConfiguration();
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue