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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java

Issue 2649143003: PaymentRequest: The currencySystem should be non-nullable. (Closed)
Patch Set: PaymentRequest: The currencySystem should be non-nullable. Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/payments/CurrencyFormatterTest.java » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java b/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java
index e8694fbadb309538e97082530d2b7fa939cf3288..bcb40f1147e017180383aa5df4936e8b9c66c7f3 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/payments/CurrencyFormatter.java
@@ -4,8 +4,6 @@
package org.chromium.chrome.browser.payments;
-import android.support.annotation.Nullable;
-
import org.chromium.base.annotations.JNINamespace;
import java.util.Locale;
@@ -29,18 +27,18 @@ public class CurrencyFormatter {
* not be null.
* @param currencySystem URI specifying the ISO4217 currency code specification. See for
* details: https://w3c.github.io/browser-payment-api/#paymentcurrencyamount-dictionary
- * Can be null, in which case "urn:iso:std:iso:4217" is assumed.
+ * By default, the value is "urn:iso:std:iso:4217".
* @param userLocale User's current locale. Should not be null.
*/
- public CurrencyFormatter(
- String currencyCode, @Nullable String currencySystem, Locale userLocale) {
+ public CurrencyFormatter(String currencyCode, String currencySystem, Locale userLocale) {
assert currencyCode != null : "currencyCode should not be null";
+ assert currencySystem != null : "currencySystem should not be null";
assert userLocale != null : "userLocale should not be null";
// Note that this pointer could leak the native object. The called must call destroy() to
// ensure that the native object is destroyed.
mCurrencyFormatterAndroid = nativeInitCurrencyFormatterAndroid(
- currencyCode, currencySystem == null ? "" : currencySystem, userLocale.toString());
+ currencyCode, currencySystem, userLocale.toString());
}
/** Will destroy the native object. This class shouldn't be used afterwards. */
« no previous file with comments | « no previous file | chrome/android/javatests/src/org/chromium/chrome/browser/payments/CurrencyFormatterTest.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698