Skip to content

Clarify that class Ascii is from Guava. #4951

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 2 additions & 1 deletion docs/bugpattern/StringCaseLocaleUsage.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Loading