mirror of
https://github.com/google/nomulus
synced 2026-01-11 08:20:27 +00:00
Replace uses of X.to(Upper|Lower)Case() with Ascii.to(Upper|Lower)Case(X)
Locales are weird. Even if all our character individually are just 0-9a-z_, different locales might still convert them differently to upper/lower cases... ------------- Created by MOE: https://github.com/google/moe MOE_MIGRATED_REVID=193512312
This commit is contained in:
@@ -17,6 +17,7 @@ package google.registry.util;
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
import static google.registry.util.CollectionUtils.union;
|
||||
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.collect.ImmutableSet;
|
||||
import java.io.IOException;
|
||||
import java.net.Inet6Address;
|
||||
@@ -72,7 +73,7 @@ public final class NetworkUtils {
|
||||
*/
|
||||
public static String getCanonicalHostName() {
|
||||
try {
|
||||
return getExternalAddressOfLocalSystem().getCanonicalHostName().toLowerCase();
|
||||
return Ascii.toLowerCase(getExternalAddressOfLocalSystem().getCanonicalHostName());
|
||||
} catch (UnknownHostException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user