mirror of
https://github.com/google/nomulus.git
synced 2025-06-26 22:34:55 +02: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:
parent
d9596fa30c
commit
e72491e59b
22 changed files with 62 additions and 38 deletions
|
@ -19,6 +19,7 @@ import static google.registry.util.DomainNameUtils.canonicalizeDomainName;
|
|||
|
||||
import com.beust.jcommander.Parameter;
|
||||
import com.beust.jcommander.Parameters;
|
||||
import com.google.common.base.Ascii;
|
||||
import google.registry.tools.Command.GtechCommand;
|
||||
import google.registry.util.Idn;
|
||||
import java.io.IOException;
|
||||
|
@ -37,7 +38,7 @@ final class ConvertIdnCommand implements Command, GtechCommand {
|
|||
public void run() throws IOException {
|
||||
for (String label : mainParameters) {
|
||||
if (label.startsWith(ACE_PREFIX)) {
|
||||
System.out.println(Idn.toUnicode(label.toLowerCase()));
|
||||
System.out.println(Idn.toUnicode(Ascii.toLowerCase(label)));
|
||||
} else {
|
||||
System.out.println(canonicalizeDomainName(label));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue