mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 13:56:53 +00:00
Add validation annotations to DynamicExperimentEnrollmentConfiguration
This commit is contained in:
1 parent
9ec4f0b2f5
commit
f6d1e566e7
2 files changed
+24
-6
No files matched your search
+8
-6
@@ -6,14 +6,13 @@
|
||||
package org.whispersystems.textsecuregcm.configuration.dynamic;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||
import com.google.common.annotations.VisibleForTesting;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import java.util.Collections;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import javax.validation.Valid;
|
||||
import javax.validation.constraints.Max;
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotNull;
|
||||
|
||||
public class DynamicExperimentEnrollmentConfiguration {
|
||||
|
||||
@@ -21,6 +20,7 @@ public class DynamicExperimentEnrollmentConfiguration {
|
||||
|
||||
@JsonProperty
|
||||
@Valid
|
||||
@NotNull
|
||||
private Set<UUID> uuids = Collections.emptySet();
|
||||
|
||||
/**
|
||||
@@ -45,7 +45,9 @@ public class DynamicExperimentEnrollmentConfiguration {
|
||||
|
||||
}
|
||||
|
||||
private UuidSelector uuidSelector = new UuidSelector();
|
||||
@Valid
|
||||
@NotNull
|
||||
private final UuidSelector uuidSelector = new UuidSelector();
|
||||
|
||||
/**
|
||||
* If the UUID is not enrolled via {@link UuidSelector#uuids}, what is the percentage chance it should be enrolled.
|
||||
|
||||
Reference in new issue
Block a user