mirror of
https://github.com/google/nomulus
synced 2026-08-18 21:26:16 +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:
@@ -14,6 +14,7 @@
|
||||
|
||||
package google.registry.tools;
|
||||
|
||||
import com.google.common.base.Ascii;
|
||||
import com.google.common.base.Strings;
|
||||
|
||||
/** Container class for static utility methods. */
|
||||
@@ -25,6 +26,6 @@ class CommandUtilities {
|
||||
|
||||
/** Prompts for yes/no input using promptText, defaulting to no. */
|
||||
static boolean promptForYes(String promptText) {
|
||||
return System.console().readLine(promptText + " (y/N): ").toUpperCase().startsWith("Y");
|
||||
return Ascii.toUpperCase(System.console().readLine(promptText + " (y/N): ")).startsWith("Y");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user