DescriptionResolve lint warnings related to DefaultLocale and SimpleDateFormat
The following lint warnings needs to be fixed as they are legitimate:
(1) org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java
Implicitly using the default locale is a common source of bugs:
Use `toLowerCase(Locale)` instead: DefaultLocale [warning]
(2) org/chromium/chrome/browser/preferences/autofill/AutofillCreditCardEditor.java
To get local formatting use `getDateInstance()`, `getDateTimeInstance()`,
or `getTimeInstance()`, or use `new SimpleDateFormat(String template, Locale locale)`
with for example `Locale.US` for ASCII dates.: SimpleDateFormat [warning]
Fixing these warning by specifying the locale in respective classes.
If a locale cannot be determined, Locale.getDefault() in case of (2).
BUG=None.
Committed: https://crrev.com/0b6c944932295452eca35de6b036797efbbe5f23
Cr-Commit-Position: refs/heads/master@{#310242}
Patch Set 1 #
Total comments: 2
Patch Set 2 : comments incorporated #
Messages
Total messages: 13 (3 generated)
|