mirror of
https://github.com/google/nomulus.git
synced 2025-05-14 00:17:20 +02:00
Refactor StringGenerator bindings
Make every dependency request explicit on what encoding is used. Also get rid of InjectRule in XjcToDomainResourceConverterTest. Random number generator providers are separated to secure and insecure ones. The insecure ones must be explicitly requested (usually for use cases where security is not of concern, for better speed). ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=217921422
This commit is contained in:
parent
1a4aae8f7d
commit
2020dcb50f
15 changed files with 84 additions and 116 deletions
|
@ -31,6 +31,7 @@ import com.google.common.base.Splitter;
|
|||
import com.google.common.collect.ImmutableSet;
|
||||
import com.google.common.io.Files;
|
||||
import com.googlecode.objectify.Key;
|
||||
import google.registry.config.RegistryConfig.Config;
|
||||
import google.registry.model.domain.token.AllocationToken;
|
||||
import google.registry.util.NonFinalForTesting;
|
||||
import google.registry.util.Retrier;
|
||||
|
@ -40,7 +41,6 @@ import java.io.IOException;
|
|||
import java.util.Collection;
|
||||
import java.util.Deque;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
|
||||
/** Command to generate and persist {@link AllocationToken}s. */
|
||||
@Parameters(
|
||||
|
@ -80,7 +80,10 @@ class GenerateAllocationTokensCommand implements CommandWithRemoteApi {
|
|||
description = "Do not actually persist the tokens; defaults to false")
|
||||
boolean dryRun;
|
||||
|
||||
@Inject @Named("base58StringGenerator") StringGenerator stringGenerator;
|
||||
@Inject
|
||||
@Config("base58StringGenerator")
|
||||
StringGenerator stringGenerator;
|
||||
|
||||
@Inject Retrier retrier;
|
||||
|
||||
private static final int BATCH_SIZE = 20;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue