mirror of
https://github.com/google/nomulus
synced 2026-07-19 14:32:44 +00:00
Add basic AllocationToken validation/redemption for domain creates
The next step is to add them for domain checks as well (which is simpler because it doesn't involve validation). This requires the addition of a TrimWhitespaceAdapter for XML JAXB objects, which will prove useful for other @XmlValue attributes in the future. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=181526726
This commit is contained in:
@@ -73,6 +73,7 @@ public class AllocationToken extends BackupGroupRoot implements Buildable {
|
||||
}
|
||||
|
||||
public Builder setToken(String token) {
|
||||
checkState(getInstance().token == null, "token can only be set once");
|
||||
checkArgumentNotNull(token, "token must not be null");
|
||||
checkArgument(!token.isEmpty(), "token must not be blank");
|
||||
getInstance().token = token;
|
||||
|
||||
Reference in New Issue
Block a user