Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(534)

Issue 800903004: Resolve lint warnings related to DefaultLocale and SimpleDateFormat (Closed)

Created:
5 years, 11 months ago by wajahat
Modified:
5 years, 11 months ago
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Resolve 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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -2 lines) Patch
M chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java View 1 2 chunks +4 lines, -1 line 0 comments Download
M chrome/android/java/src/org/chromium/chrome/browser/preferences/autofill/AutofillCreditCardEditor.java View 2 chunks +2 lines, -1 line 0 comments Download

Messages

Total messages: 13 (3 generated)
wajahat
Pl. review, Thanks!
5 years, 11 months ago (2015-01-05 08:43:23 UTC) #2
newt (away)
https://codereview.chromium.org/800903004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java File chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java (right): https://codereview.chromium.org/800903004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java#newcode293 chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java:293: Locale.ENGLISH); Actually, this should be "Locale.US" (to be consistent ...
5 years, 11 months ago (2015-01-05 18:23:37 UTC) #3
nyquist
ianwen: Does the change to AutofillCreditCardEditor look OK to you?
5 years, 11 months ago (2015-01-05 21:41:40 UTC) #5
newt (away)
On 2015/01/05 21:41:40, nyquist wrote: > ianwen: Does the change to AutofillCreditCardEditor look OK to ...
5 years, 11 months ago (2015-01-05 21:55:42 UTC) #6
wajahat
Thanks for the review, Comments incorporated in OmniboxUrlEmphasizer class, PTAL! https://codereview.chromium.org/800903004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java File chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java (right): https://codereview.chromium.org/800903004/diff/1/chrome/android/java/src/org/chromium/chrome/browser/omnibox/OmniboxUrlEmphasizer.java#newcode293 ...
5 years, 11 months ago (2015-01-06 08:41:44 UTC) #7
newt (away)
lgtm
5 years, 11 months ago (2015-01-06 15:42:35 UTC) #8
nyquist
lgtm
5 years, 11 months ago (2015-01-06 16:40:31 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/800903004/20001
5 years, 11 months ago (2015-01-07 05:44:38 UTC) #11
commit-bot: I haz the power
Committed patchset #2 (id:20001)
5 years, 11 months ago (2015-01-07 06:48:34 UTC) #12
commit-bot: I haz the power
5 years, 11 months ago (2015-01-07 06:49:36 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/0b6c944932295452eca35de6b036797efbbe5f23
Cr-Commit-Position: refs/heads/master@{#310242}

Powered by Google App Engine
This is Rietveld 408576698