mirror of
https://github.com/google/nomulus
synced 2026-08-19 05:36:11 +00:00
Replace to(Upper|Lower)Case with Ascii.to$1Case
The presubmits are warning that toUpperCase() and toLowerCase() are locale-specific, and advise using Ascii.toUpperCase() and Ascii.toLowerCase() as a local-invariant alternative. ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=127583677
This commit is contained in:
@@ -17,6 +17,7 @@ package google.registry.tools;
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static com.google.common.base.Preconditions.checkState;
|
||||
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import com.google.common.collect.ImmutableMap;
|
||||
import google.registry.config.RegistryEnvironment;
|
||||
@@ -61,7 +62,7 @@ enum RegistryToolEnvironment {
|
||||
* @see #get()
|
||||
*/
|
||||
static RegistryToolEnvironment parseFromArgs(String[] args) {
|
||||
return valueOf(getFlagValue(args, FLAGS).toUpperCase());
|
||||
return valueOf(Ascii.toUpperCase(getFlagValue(args, FLAGS)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user