diff --git a/core/src/main/java/com/google/errorprone/bugpatterns/StringCaseLocaleUsage.java b/core/src/main/java/com/google/errorprone/bugpatterns/StringCaseLocaleUsage.java index 079454f8b73..8ab9dfa6921 100644 --- a/core/src/main/java/com/google/errorprone/bugpatterns/StringCaseLocaleUsage.java +++ b/core/src/main/java/com/google/errorprone/bugpatterns/StringCaseLocaleUsage.java @@ -86,7 +86,7 @@ private static SuggestedFix suggestAscii(MethodInvocationTree tree, VisitorState var fix = SuggestedFix.builder() .setShortDescription( - "Replace with Ascii.toLower/UpperCase; this changes behaviour for non-ASCII" + "Replace with Guava's Ascii.toLower/UpperCase; this changes behaviour for non-ASCII" + " Strings"); String ascii = SuggestedFixes.qualifyType(state, fix, "com.google.common.base.Ascii"); fix.replace( diff --git a/docs/bugpattern/StringCaseLocaleUsage.md b/docs/bugpattern/StringCaseLocaleUsage.md index 2d8c4d0fc30..6d37f242afc 100644 --- a/docs/bugpattern/StringCaseLocaleUsage.md +++ b/docs/bugpattern/StringCaseLocaleUsage.md @@ -10,4 +10,5 @@ If this kind of regionalisation is desired, use `.toLowerCase(Locale.getDefault())` to make that explicit. If not, `.toLowerCase(Locale.ROOT)` or `.toLowerCase(Locale.ENGLISH)` will give you casing independent of the user's current `Locale`. If you know that you're -operating on ASCII, prefer `Ascii.toLower/UpperCase` to make that explicit. +operating on ASCII, prefer `Ascii.toLower/UpperCase` (from Guava, if available) +to make that explicit.