mirror of
https://github.com/google/nomulus
synced 2026-02-05 04:21:07 +00: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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user